Libmv: Solve some strict warnings in tests
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 19 Jan 2016 09:00:53 +0000 (14:00 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 19 Jan 2016 09:06:25 +0000 (14:06 +0500)
intern/libmv/libmv/autotrack/predict_tracks_test.cc
intern/libmv/libmv/multiview/euclidean_resection_test.cc
intern/libmv/libmv/multiview/projection_test.cc
intern/libmv/libmv/numeric/poly_test.cc
intern/libmv/libmv/simple_pipeline/detect_test.cc

index fc90e260d949d32d441fd5806e564ce16f8c9d1f..f7c2c68d750926ce75164d28faf06a770497f118 100644 (file)
@@ -29,7 +29,7 @@
 
 namespace mv {
 
-void AddMarker(int frame, float x, float y, Tracks* tracks) {
+static void AddMarker(int frame, float x, float y, Tracks* tracks) {
   Marker marker;
   marker.clip = marker.track = 0;
   marker.frame = frame;
index 5ec9dbda3cfee7b05a5d30b060b337457f75902e..378837d3d2db5d9841a0d8b0079187795862f856 100644 (file)
@@ -28,15 +28,15 @@ using namespace libmv::euclidean_resection;
 using namespace libmv;
 
 // Generates all necessary inputs and expected outputs for EuclideanResection.
-void CreateCameraSystem(const Mat3& KK,
-                        const Mat3X& x_image,
-                        const Vec& X_distances,
-                        const Mat3& R_input,
-                        const Vec3& T_input,
-                        Mat2X *x_camera,
-                        Mat3X *X_world,
-                        Mat3  *R_expected,
-                        Vec3  *T_expected) {
+static void CreateCameraSystem(const Mat3& KK,
+                               const Mat3X& x_image,
+                               const Vec& X_distances,
+                               const Mat3& R_input,
+                               const Vec3& T_input,
+                               Mat2X *x_camera,
+                               Mat3X *X_world,
+                               Mat3  *R_expected,
+                               Vec3  *T_expected) {
   int num_points = x_image.cols();
 
   Mat3X x_unit_cam(3, num_points);
index c060bfb068164dd0cf1d45e819a06ff15adebadc..460a186e7c44d6fc6adab4c204a7eac1a228a0f3 100644 (file)
@@ -76,8 +76,8 @@ TEST(Projection, isInFrontOfCamera) {
   bool res_front = isInFrontOfCamera(P, X_front);
   bool res_back = isInFrontOfCamera(P, X_back);
 
-  EXPECT_EQ(true, res_front);
-  EXPECT_EQ(false, res_back);
+  EXPECT_TRUE(res_front);
+  EXPECT_FALSE(res_back);
 }
 
 TEST(AutoCalibration, ProjectionShiftPrincipalPoint) {
index ea50383190fd109f98037a6d0a7140ecc5c80bee..69f887b416c249ea091f251c3a83eb972ef7948b 100644 (file)
@@ -40,21 +40,6 @@ void CoeffsForCubicZeros(double a, double b, double c,
   *q = (a * b + (b + a) * c);
   *r = -a * b * c;
 }
-// Find the polynomial coefficients of x in the equation
-//
-//   (x - a)(x - b)(x - c)(x - d) == 0
-//
-// by expanding to
-//
-//   x^4 - (d+c+b+a) * x^3 + (d*(c+b+a) + a*b+(b+a)*c) * x^2
-//   - (d*(a*b+(b+a)*c)+a*b*c) * x + a*b*c*d = 0.
-void CoeffsForQuarticZeros(double a, double b, double c, double d,
-                    double *p, double *q, double *r, double *s) {
-  *p = -(d + c + b + a);
-  *q = (d * (c + b + a) + a * b + (b + a) * c);
-  *r = -(d * (a * b + (b + a) * c) + a * b * c);
-  *s = a * b * c *d;
-}
 
 TEST(Poly, SolveCubicPolynomial) {
   double a, b, c, aa, bb, cc;
index fe57e3d04a2746d5883716475ceac0cfb74f3f41..b226ad96595f5e56a9352176b6aff65b04a80ba6 100644 (file)
@@ -46,6 +46,7 @@ void PreformSinglePointTest(const DetectOptions &options) {
   }
 }
 
+#if 0
 void PreformCheckerBoardTest(const DetectOptions &options) {
   // Prepare the image.
   FloatImage image(30, 30);
@@ -80,6 +81,7 @@ void PreformCheckerBoardTest(const DetectOptions &options) {
     EXPECT_LE(1, std::abs(feature.y - rounded_y));
   }
 }
+#endif
 
 void CheckExpectedFeatures(const vector<Feature> &detected_features,
                            const vector<Feature> &expected_features) {