Skip to content

Commit c3c0453

Browse files
generatedunixname1435320781521086meta-codesync[bot]
authored andcommitted
Fix CQS signal facebook-hte-UnqualifiedCall-sqrt in fbcode/mapillary/opensfm
Differential Revision: D92372593 fbshipit-source-id: b3b18a93eb94f2a353632aa9846ec804cbce6623
1 parent 8dc1979 commit c3c0453

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

opensfm/src/dense/src/depthmap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ float NCCEstimator::Get() {
6969
if (varx < 0.1 || vary < 0.1) {
7070
return -1;
7171
} else {
72-
return (meanxy - meanx * meany) / sqrt(varx * vary);
72+
return (meanxy - meanx * meany) / std::sqrt(varx * vary);
7373
}
7474
}
7575

opensfm/src/features/src/hahog.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ py::tuple hahog(foundation::pyarray_f image, float peak_threshold,
173173
for (i = 0; i < (signed)numFeatures; ++i) {
174174
const VlFrameOrientedEllipse& frame = vecFeatures.at(i).frame;
175175
float det = frame.a11 * frame.a22 - frame.a12 * frame.a21;
176-
float size = sqrt(fabs(det));
176+
float size = std::sqrt(fabs(det));
177177
float angle = atan2(frame.a21, frame.a11) * 180.0f / M_PI;
178178
points[4 * i + 0] = frame.x;
179179
points[4 * i + 1] = frame.y;

opensfm/src/features/src/matching.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ float DistanceL2(const float* pa, const float* pb, int n) {
2828
for (int i = 0; i < n; ++i) {
2929
distance += (pa[i] - pb[i]) * (pa[i] - pb[i]);
3030
}
31-
return sqrt(distance);
31+
return std::sqrt(distance);
3232
}
3333

3434
void MatchUsingWords(const cv::Mat& f1, const cv::Mat& w1, const cv::Mat& f2,

0 commit comments

Comments
 (0)