Skip to content

Commit 3bbf9e5

Browse files
generatedunixname89002005287564meta-codesync[bot]
authored andcommitted
Fix CQS signal facebook-hte-MissingExplicit in fbcode/mapillary/opensfm
Differential Revision: D90566661 fbshipit-source-id: 03072b0ec562539e50dab36971c566d33c88ffc4
1 parent 6962c31 commit 3bbf9e5

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

opensfm/src/geometry/pose.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ class Pose {
1616
}
1717
virtual ~Pose() = default;
1818

19-
Pose(const Vec3d& R, const Vec3d& t = Vec3d::Zero()) {
19+
explicit Pose(const Vec3d& R, const Vec3d& t = Vec3d::Zero()) {
2020
SetFromWorldToCamera(R, t);
2121
}
22-
Pose(const Mat3d& R, const Vec3d& t = Vec3d::Zero()) {
22+
explicit Pose(const Mat3d& R, const Vec3d& t = Vec3d::Zero()) {
2323
Mat4d T_cw = Mat4d::Identity();
2424
T_cw.block<3, 3>(0, 0) = R;
2525
T_cw.block<3, 1>(0, 3) = t;

opensfm/src/map/dataviews.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace map {
1212
class Map;
1313
class ShotView {
1414
public:
15-
ShotView(Map& map);
15+
explicit ShotView(Map& map);
1616
Shot& GetShot(const map::ShotId& shot_id);
1717
bool HasShot(const map::ShotId& shot_id) const;
1818
const std::unordered_map<ShotId, Shot>& GetShots() const;
@@ -24,7 +24,7 @@ class ShotView {
2424

2525
class PanoShotView {
2626
public:
27-
PanoShotView(Map& map);
27+
explicit PanoShotView(Map& map);
2828
Shot& GetShot(const map::ShotId& shot_id);
2929
bool HasShot(const map::ShotId& shot_id) const;
3030
const std::unordered_map<ShotId, Shot>& GetShots() const;
@@ -36,7 +36,7 @@ class PanoShotView {
3636

3737
class LandmarkView {
3838
public:
39-
LandmarkView(Map& map);
39+
explicit LandmarkView(Map& map);
4040
Landmark& GetLandmark(const LandmarkId& lm_id);
4141
bool HasLandmark(const LandmarkId& lm_id) const;
4242
const std::unordered_map<LandmarkId, Landmark>& GetLandmarks() const;
@@ -48,7 +48,7 @@ class LandmarkView {
4848

4949
class CameraView {
5050
public:
51-
CameraView(Map& map);
51+
explicit CameraView(Map& map);
5252
size_t NumberOfCameras() const;
5353
geometry::Camera& GetCamera(const CameraId& cam_id);
5454
const std::unordered_map<CameraId, geometry::Camera>& GetCameras() const;

opensfm/src/robust/scorer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ struct ScoreInfo {
2020

2121
class RansacScoring {
2222
public:
23-
RansacScoring(double threshold) : threshold_(threshold) {}
23+
explicit RansacScoring(double threshold) : threshold_(threshold) {}
2424

2525
template <class IT, class T>
2626
ScoreInfo<T> Score(IT begin, IT end,
@@ -40,7 +40,7 @@ class RansacScoring {
4040
class MedianBasedScoring {
4141
public:
4242
MedianBasedScoring() = default;
43-
MedianBasedScoring(double nth) : nth_(nth) {}
43+
explicit MedianBasedScoring(double nth) : nth_(nth) {}
4444

4545
template <class IT>
4646
double ComputeMedian(IT begin, IT end) const {
@@ -60,7 +60,7 @@ class MedianBasedScoring {
6060

6161
class MSacScoring {
6262
public:
63-
MSacScoring(double threshold) : threshold_(threshold) {}
63+
explicit MSacScoring(double threshold) : threshold_(threshold) {}
6464

6565
template <class IT, class T>
6666
ScoreInfo<T> Score(IT begin, IT end,
@@ -85,7 +85,7 @@ class MSacScoring {
8585

8686
class LMedSScoring : public MedianBasedScoring {
8787
public:
88-
LMedSScoring(double multiplier)
88+
explicit LMedSScoring(double multiplier)
8989
: MedianBasedScoring(0.5), multiplier_(multiplier) {}
9090

9191
template <class IT, class T>

0 commit comments

Comments
 (0)