message: make flag const and avoid 0-division
diff: @@ -478,7 +478,7 @@ void Calibration96Tof1::buildGeometryCalibrationCache(
  float x0 = cameraMatrix[2];
  float y0 = cameraMatrix[5];
  - bool validParameters = (fx != 0 && fy != 0);
  + const bool validParameters = (fx != 0 && fy != 0);
  if (m_geometry_cache) {
  delete[] m_geometry_cache;
  @@ -492,14 +492,15 @@ void Calibration96Tof1::buildGeometryCalibrationCache(
  m_geometry_cache = new double[width * height];
  for (uint16_t i = 0; i < height; i++) {
  for (uint16_t j = 0; j < width; j++) {
  -
  + if (validParameters) {
  double tanXAngle = (x0 - j) / fx;
  double tanYAngle = (y0 - i) / fy;
  m_geometry_cache[i * width + j] =
  - (validParameters) ? 1.0 / sqrt(1 + tanXAngle * tanXAngle +
  - tanYAngle * tanYAngle)
  - : 1;
  + sqrt(1 + tanXAngle * tanXAngle + tanYAngle * tanYAngle);
  + } else {
  + m_geometry_cache[i * width + j] = 1;
  + }
  }
  }
  }
  