Removing using std::... Change-Id: I584402e2a34869183c1d59071a15d97b216c52fb
diff --git a/internal/ceres/rotation_test.cc b/internal/ceres/rotation_test.cc index 577f8ed..b59c487 100644 --- a/internal/ceres/rotation_test.cc +++ b/internal/ceres/rotation_test.cc
@@ -50,17 +50,11 @@ namespace ceres { namespace internal { -using std::max; -using std::min; -using std::numeric_limits; -using std::string; -using std::swap; - inline constexpr double kPi = constants::pi_v<double>; const double kHalfSqrt2 = 0.707106781186547524401; // A tolerance value for floating-point comparisons. -static double const kTolerance = numeric_limits<double>::epsilon() * 10; +static double const kTolerance = std::numeric_limits<double>::epsilon() * 10; // Looser tolerance used for numerically unstable conversions. static double const kLooseTolerance = 1e-9; @@ -136,12 +130,12 @@ Eigen::Vector3d e(expected[0], expected[1], expected[2]); const double e_norm = e.norm(); - double delta_norm = numeric_limits<double>::max(); + double delta_norm = std::numeric_limits<double>::max(); if (e_norm > 0) { // Deal with the sign ambiguity near PI. Since the sign can flip, // we take the smaller of the two differences. if (fabs(e_norm - kPi) < kLooseTolerance) { - delta_norm = min((a - e).norm(), (a + e).norm()) / e_norm; + delta_norm = std::min((a - e).norm(), (a + e).norm()) / e_norm; } else { delta_norm = (a - e).norm() / e_norm; } @@ -229,7 +223,7 @@ // Test that approximate conversion works for very small angles. TEST(Rotation, TinyAngleAxisToQuaternion) { // Very small value that could potentially cause underflow. - double theta = pow(numeric_limits<double>::min(), 0.75); + double theta = pow(std::numeric_limits<double>::min(), 0.75); double axis_angle[3] = {theta, 0, 0}; double quaternion[4]; double expected[4] = {cos(theta / 2), sin(theta / 2.0), 0, 0}; @@ -290,7 +284,7 @@ // Test that approximate conversion works for very small angles. TEST(Rotation, TinyQuaternionToAngleAxis) { // Very small value that could potentially cause underflow. - double theta = pow(numeric_limits<double>::min(), 0.75); + double theta = pow(std::numeric_limits<double>::min(), 0.75); double quaternion[4] = {cos(theta / 2), sin(theta / 2.0), 0, 0}; double axis_angle[3]; double expected[3] = {theta, 0, 0}; @@ -496,7 +490,7 @@ LOG(INFO) << "Rotation:"; LOG(INFO) << "EXPECTED | ACTUAL"; for (int i = 0; i < 3; ++i) { - string line; + std::string line; for (int j = 0; j < 3; ++j) { StringAppendF(&line, "%g ", kMatrix[i][j]); } @@ -600,16 +594,16 @@ for (int i = 0; i < 3; ++i) { EXPECT_NEAR( - round_trip[i], axis_angle[i], numeric_limits<double>::epsilon()); + round_trip[i], axis_angle[i], std::numeric_limits<double>::epsilon()); } } } // Transposes a 3x3 matrix. static void Transpose3x3(double m[9]) { - swap(m[1], m[3]); - swap(m[2], m[6]); - swap(m[5], m[7]); + std::swap(m[1], m[3]); + std::swap(m[2], m[6]); + std::swap(m[5], m[7]); } // Convert Euler angles from radians to degrees. @@ -976,11 +970,11 @@ // Log-10 of a value well below machine precision. static const int kSmallTinyCutoff = - static_cast<int>(2 * log(numeric_limits<double>::epsilon()) / log(10.0)); + static_cast<int>(2 * log(std::numeric_limits<double>::epsilon()) / log(10.0)); // Log-10 of a value just below values representable by double. static const int kTinyZeroLimit = - static_cast<int>(1 + log(numeric_limits<double>::min()) / log(10.0)); + static_cast<int>(1 + log(std::numeric_limits<double>::min()) / log(10.0)); // Test that exact conversion works for small angles when jets are used. TEST(Rotation, SmallAngleAxisToQuaternionForJets) {