Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-01-19 12:00:53 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-01-19 12:06:25 +0300
commitdf465368baed5cc7e510c4f26ceef728beeb45ad (patch)
tree00921b22cda9fe0fb47d69e7bb6e387a16451123 /intern/libmv
parent9b8eb4156782287811705b4253329b9173699580 (diff)
Libmv: Solve some strict warnings in tests
Diffstat (limited to 'intern/libmv')
-rw-r--r--intern/libmv/libmv/autotrack/predict_tracks_test.cc2
-rw-r--r--intern/libmv/libmv/multiview/euclidean_resection_test.cc18
-rw-r--r--intern/libmv/libmv/multiview/projection_test.cc4
-rw-r--r--intern/libmv/libmv/numeric/poly_test.cc15
-rw-r--r--intern/libmv/libmv/simple_pipeline/detect_test.cc2
5 files changed, 14 insertions, 27 deletions
diff --git a/intern/libmv/libmv/autotrack/predict_tracks_test.cc b/intern/libmv/libmv/autotrack/predict_tracks_test.cc
index fc90e260d94..f7c2c68d750 100644
--- a/intern/libmv/libmv/autotrack/predict_tracks_test.cc
+++ b/intern/libmv/libmv/autotrack/predict_tracks_test.cc
@@ -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;
diff --git a/intern/libmv/libmv/multiview/euclidean_resection_test.cc b/intern/libmv/libmv/multiview/euclidean_resection_test.cc
index 5ec9dbda3cf..378837d3d2d 100644
--- a/intern/libmv/libmv/multiview/euclidean_resection_test.cc
+++ b/intern/libmv/libmv/multiview/euclidean_resection_test.cc
@@ -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);
diff --git a/intern/libmv/libmv/multiview/projection_test.cc b/intern/libmv/libmv/multiview/projection_test.cc
index c060bfb0681..460a186e7c4 100644
--- a/intern/libmv/libmv/multiview/projection_test.cc
+++ b/intern/libmv/libmv/multiview/projection_test.cc
@@ -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) {
diff --git a/intern/libmv/libmv/numeric/poly_test.cc b/intern/libmv/libmv/numeric/poly_test.cc
index ea50383190f..69f887b416c 100644
--- a/intern/libmv/libmv/numeric/poly_test.cc
+++ b/intern/libmv/libmv/numeric/poly_test.cc
@@ -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;
diff --git a/intern/libmv/libmv/simple_pipeline/detect_test.cc b/intern/libmv/libmv/simple_pipeline/detect_test.cc
index fe57e3d04a2..b226ad96595 100644
--- a/intern/libmv/libmv/simple_pipeline/detect_test.cc
+++ b/intern/libmv/libmv/simple_pipeline/detect_test.cc
@@ -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) {