From 25e4f30c70644e68e343e564c8bc030754ca698d Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Wed, 9 Sep 2020 19:37:10 -0700 Subject: [PATCH] Bump ign-math to 6.5, update style Signed-off-by: Louise Poubel --- CMakeLists.txt | 18 +++++++++--------- src/Utility.cc | 4 ++-- src/Utility_TEST.cc | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b7c7ec0..ab017cfd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,18 +23,18 @@ ign_configure_project(VERSION_SUFFIX pre1) # Cross-compilation related options # In a cross-compilation scenario, it is possible that the ign_msgs_gen # generator compiled for the target machine cannot be used to generate -# the C++ code corresponding to the .proto definition. For this scenario, -# the following two options can be used as follows. +# the C++ code corresponding to the .proto definition. For this scenario, +# the following two options can be used as follows. # First of all, ign-msgs is compiled targeting the host machine, and in the # build targeting the host, the INSTALL_IGN_MSGS_GEN_EXECUTABLE option is # enabled: -# > cmake -DINSTALL_IGN_MSGS_GEN_EXECUTABLE:BOOL=ON .. -# ensuring that the ign_msgs_gen is installed in -# /bin/ign_msgs_gen . Then, the same version of ign-msgs +# > cmake -DINSTALL_IGN_MSGS_GEN_EXECUTABLE:BOOL=ON .. +# ensuring that the ign_msgs_gen is installed in +# /bin/ign_msgs_gen . Then, the same version of ign-msgs # can be cross-compiled, and in the cross-compilation build the location of the -# host ign_msgs_gen is specified via the IGN_MSGS_GEN_EXECUTABLE -# CMake cache variable: -# > cmake -IGN_MSGS_GEN_EXECUTABLE=/bin/ign_msgs_gen .. +# host ign_msgs_gen is specified via the IGN_MSGS_GEN_EXECUTABLE +# CMake cache variable: +# > cmake -IGN_MSGS_GEN_EXECUTABLE=/bin/ign_msgs_gen .. option( INSTALL_IGN_MSGS_GEN_EXECUTABLE @@ -65,7 +65,7 @@ ign_find_package(IgnProtobuf #-------------------------------------- # Find ignition-math -ign_find_package(ignition-math6 REQUIRED) +ign_find_package(ignition-math6 REQUIRED VERSION 6.5) set(IGN_MATH_VER ${ignition-math6_VERSION_MAJOR}) #-------------------------------------- diff --git a/src/Utility.cc b/src/Utility.cc index be4efdf9..2eb26b5a 100644 --- a/src/Utility.cc +++ b/src/Utility.cc @@ -346,10 +346,10 @@ namespace ignition } ///////////////////////////////////////////////// - msgs::Time Convert(const std::chrono::steady_clock::time_point &_time_point) + msgs::Time Convert(const std::chrono::steady_clock::time_point &_timePoint) { std::pair timeSecAndNsecs = - ignition::math::timePointToSecNsec(_time_point); + ignition::math::timePointToSecNsec(_timePoint); msgs::Time msg; msg.set_sec(timeSecAndNsecs.first); msg.set_nsec(timeSecAndNsecs.second); diff --git a/src/Utility_TEST.cc b/src/Utility_TEST.cc index 567d2ea2..b40440de 100644 --- a/src/Utility_TEST.cc +++ b/src/Utility_TEST.cc @@ -319,17 +319,17 @@ TEST(UtilityTest, ConvertFloat) ///////////////////////////////////////////////// TEST(UtilityTest, ConvertTimePoint) { - std::chrono::steady_clock::time_point time_point = + std::chrono::steady_clock::time_point timePoint = math::secNsecToTimePoint(0, 0); - msgs::Time msg = msgs::Convert(time_point); + msgs::Time msg = msgs::Convert(timePoint); EXPECT_EQ(0, msg.sec()); EXPECT_EQ(0, msg.nsec()); std::chrono::steady_clock::time_point s = msgs::Convert(msg); EXPECT_EQ(s, math::secNsecToTimePoint(0, 0)); - time_point = math::secNsecToTimePoint(200, 999); - msg = msgs::Convert(time_point); + timePoint = math::secNsecToTimePoint(200, 999); + msg = msgs::Convert(timePoint); EXPECT_EQ(200, msg.sec()); EXPECT_EQ(999, msg.nsec()); }