diff --git a/core/sample-vpForceTwistMatrix-4.cpp b/core/sample-vpForceTwistMatrix-4.cpp index 669ff2d..bb7c6c6 100644 --- a/core/sample-vpForceTwistMatrix-4.cpp +++ b/core/sample-vpForceTwistMatrix-4.cpp @@ -2,21 +2,19 @@ int main() { -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) { - vpTranslationVector stp(0.1, 0.2, 0.3); - vpRotationMatrix sRp( {0, 0, -1, - 0, -1, 0, - -1, 0, 0} ); - vpForceTwistMatrix sFp(stp, sRp); - std::cout << "sFp:\n" << sFp << std::endl; + vpTranslationVector stp(0.1, 0.2, 0.3); + vpRotationMatrix sRp({ 0, 0, -1, + 0, -1, 0, + -1, 0, 0 }); + vpForceTwistMatrix sFp(stp, sRp); + std::cout << "sFp:\n" << sFp << std::endl; } { - vpRotationMatrix sRp( {0, 0, -1, - 0, -1, 0, - -1, 0, 0} ); - vpForceTwistMatrix sFp(sRp); - std::cout << "sFp:\n" << sFp << std::endl; + vpRotationMatrix sRp({ 0, 0, -1, + 0, -1, 0, + -1, 0, 0 }); + vpForceTwistMatrix sFp(sRp); + std::cout << "sFp:\n" << sFp << std::endl; } -#endif } diff --git a/core/sample-vpVelocityTwistMatrix-3.cpp b/core/sample-vpVelocityTwistMatrix-3.cpp index f59c9bb..28325c2 100644 --- a/core/sample-vpVelocityTwistMatrix-3.cpp +++ b/core/sample-vpVelocityTwistMatrix-3.cpp @@ -2,7 +2,6 @@ int main() { -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) { vpTranslationVector cte(0.1, 0.2, 0.3); vpRotationMatrix cRe( {0, 0, -1, @@ -19,5 +18,4 @@ int main() vpVelocityTwistMatrix cVe(cRe); std::cout << "cVe:\n" << cVe << std::endl; } -#endif } diff --git a/json/sample-json-vpColVector.cpp b/json/sample-json-vpColVector.cpp index 517cb90..e1b67e3 100644 --- a/json/sample-json-vpColVector.cpp +++ b/json/sample-json-vpColVector.cpp @@ -5,15 +5,8 @@ int main() #if defined(VISP_HAVE_NLOHMANN_JSON) std::string filename = "col-vector.json"; { -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) vpColVector v({ 1, 2, 3, 4 }); -#else - vpColVector v(4); - v[0] = 1; - v[1] = 2; - v[2] = 3; - v[3] = 4; -#endif + std::ofstream file(filename); const nlohmann::json j = v; file << j; diff --git a/json/sample-json-vpHomogeneousMatrix.cpp b/json/sample-json-vpHomogeneousMatrix.cpp index fe92aeb..4c1cd25 100644 --- a/json/sample-json-vpHomogeneousMatrix.cpp +++ b/json/sample-json-vpHomogeneousMatrix.cpp @@ -5,14 +5,8 @@ int main() #if defined(VISP_HAVE_NLOHMANN_JSON) std::string filename = "homo-mat.json"; { -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) vpHomogeneousMatrix M(vpTranslationVector(0.1, 0.2, 0.3), vpRotationMatrix({ 0, 0, 1, 0, -1, 0, -1, 0, 0 })); -#else - vpHomogeneousMatrix M; - M[0][0] = 0; M[0][1] = 0; M[0][2] = 1; M[0][2] = 0.1; - M[1][0] = 0; M[1][1] = -1; M[1][2] = 0; M[1][2] = 0.2; - M[2][0] = -1; M[2][1] = 0; M[2][2] = 0; M[2][2] = 0.3; -#endif + std::ofstream file(filename); const nlohmann::json j = M; file << j;