From d1ae55bf656ad84ce0db7769176fe7cbe517d59c Mon Sep 17 00:00:00 2001 From: methylDragon Date: Tue, 9 Aug 2022 12:31:38 -0700 Subject: [PATCH] Remove redunant namespace references Signed-off-by: methylDragon --- src/PointCloudPackedUtils_TEST.cc | 12 ++++---- src/Utility_TEST.cc | 46 +++++++++++++++---------------- src/ign.cc | 4 +-- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/PointCloudPackedUtils_TEST.cc b/src/PointCloudPackedUtils_TEST.cc index 93ef0f24..ebe87732 100644 --- a/src/PointCloudPackedUtils_TEST.cc +++ b/src/PointCloudPackedUtils_TEST.cc @@ -125,17 +125,17 @@ TEST(PointCloudPackedUtilsTest, MultipleFields) EXPECT_EQ("x", pcMsg.field(0).name()); EXPECT_EQ(0u, pcMsg.field(0).offset()); - EXPECT_EQ(msgs::PointCloudPacked::Field::INT8, pcMsg.field(0).datatype()); + EXPECT_EQ(PointCloudPacked::Field::INT8, pcMsg.field(0).datatype()); EXPECT_EQ(1u, pcMsg.field(0).count()); EXPECT_EQ("y", pcMsg.field(1).name()); EXPECT_EQ(1u, pcMsg.field(1).offset()); - EXPECT_EQ(msgs::PointCloudPacked::Field::UINT8, pcMsg.field(1).datatype()); + EXPECT_EQ(PointCloudPacked::Field::UINT8, pcMsg.field(1).datatype()); EXPECT_EQ(1u, pcMsg.field(1).count()); EXPECT_EQ("z", pcMsg.field(2).name()); EXPECT_EQ(2u, pcMsg.field(2).offset()); - EXPECT_EQ(msgs::PointCloudPacked::Field::INT16, pcMsg.field(2).datatype()); + EXPECT_EQ(PointCloudPacked::Field::INT16, pcMsg.field(2).datatype()); EXPECT_EQ(1u, pcMsg.field(2).count()); // Reserve space for data @@ -237,9 +237,9 @@ TEST(PointCloudPackedUtilsTest, XYZRGBA) { PointCloudPacked pcMsg; - msgs::InitPointCloudPacked(pcMsg, "my_frame", true, - {{"xyz", msgs::PointCloudPacked::Field::FLOAT32}, - {"rgba", msgs::PointCloudPacked::Field::FLOAT32}}); + InitPointCloudPacked(pcMsg, "my_frame", true, + {{"xyz", PointCloudPacked::Field::FLOAT32}, + {"rgba", PointCloudPacked::Field::FLOAT32}}); // Reserve space for data unsigned int total{5 * pcMsg.point_step()}; diff --git a/src/Utility_TEST.cc b/src/Utility_TEST.cc index 9dd7a29f..2d0da14c 100644 --- a/src/Utility_TEST.cc +++ b/src/Utility_TEST.cc @@ -178,12 +178,12 @@ TEST(UtilityTest, ConvertMsgsPlaneToMath) ///////////////////////////////////////////////// TEST(MsgsTest, ConvertMathInertialToMsgs) { - const auto pose = ignition::math::Pose3d(5, 6, 7, 0.4, 0.5, 0.6); + const auto pose = math::Pose3d(5, 6, 7, 0.4, 0.5, 0.6); msgs::Inertial msg = msgs::Convert( - ignition::math::Inertiald( - ignition::math::MassMatrix3d(12.0, - ignition::math::Vector3d(2, 3, 4), - ignition::math::Vector3d(0.1, 0.2, 0.3)), + math::Inertiald( + math::MassMatrix3d(12.0, + math::Vector3d(2, 3, 4), + math::Vector3d(0.1, 0.2, 0.3)), pose)); EXPECT_DOUBLE_EQ(12.0, msg.mass()); @@ -199,12 +199,12 @@ TEST(MsgsTest, ConvertMathInertialToMsgs) ///////////////////////////////////////////////// TEST(MsgsTest, ConvertMsgsInertialToMath) { - const auto pose = ignition::math::Pose3d(5, 6, 7, 0.4, 0.5, 0.6); + const auto pose = math::Pose3d(5, 6, 7, 0.4, 0.5, 0.6); msgs::Inertial msg = msgs::Convert( - ignition::math::Inertiald( - ignition::math::MassMatrix3d(12.0, - ignition::math::Vector3d(2, 3, 4), - ignition::math::Vector3d(0.1, 0.2, 0.3)), + math::Inertiald( + math::MassMatrix3d(12.0, + math::Vector3d(2, 3, 4), + math::Vector3d(0.1, 0.2, 0.3)), pose)); auto inertial = msgs::Convert(msg); @@ -222,9 +222,9 @@ TEST(MsgsTest, ConvertMsgsInertialToMath) TEST(MsgsTest, ConvertMathMassMatrix3ToMsgs) { msgs::Inertial msg = msgs::Convert( - ignition::math::MassMatrix3d(12.0, - ignition::math::Vector3d(2, 3, 4), - ignition::math::Vector3d(0.1, 0.2, 0.3))); + math::MassMatrix3d(12.0, + math::Vector3d(2, 3, 4), + math::Vector3d(0.1, 0.2, 0.3))); EXPECT_DOUBLE_EQ(12.0, msg.mass()); EXPECT_DOUBLE_EQ(2.0, msg.ixx()); @@ -233,7 +233,7 @@ TEST(MsgsTest, ConvertMathMassMatrix3ToMsgs) EXPECT_DOUBLE_EQ(0.1, msg.ixy()); EXPECT_DOUBLE_EQ(0.2, msg.ixz()); EXPECT_DOUBLE_EQ(0.3, msg.iyz()); - EXPECT_EQ(ignition::math::Pose3d::Zero, msgs::Convert(msg.pose())); + EXPECT_EQ(math::Pose3d::Zero, msgs::Convert(msg.pose())); } ///////////////////////////////////////////////// @@ -522,13 +522,13 @@ TEST(UtilityTest, SetPlane) ///////////////////////////////////////////////// TEST(MsgsTest, SetInertial) { - const auto pose = ignition::math::Pose3d(5, 6, 7, 0.4, 0.5, 0.6); + const auto pose = math::Pose3d(5, 6, 7, 0.4, 0.5, 0.6); msgs::Inertial msg; - msgs::Set(&msg, ignition::math::Inertiald( - ignition::math::MassMatrix3d( + msgs::Set(&msg, math::Inertiald( + math::MassMatrix3d( 12.0, - ignition::math::Vector3d(2, 3, 4), - ignition::math::Vector3d(0.1, 0.2, 0.3)), + math::Vector3d(2, 3, 4), + math::Vector3d(0.1, 0.2, 0.3)), pose)); EXPECT_DOUBLE_EQ(12.0, msg.mass()); @@ -545,10 +545,10 @@ TEST(MsgsTest, SetInertial) TEST(MsgsTest, SetMassMatrix3) { msgs::Inertial msg; - msgs::Set(&msg, ignition::math::MassMatrix3d( + msgs::Set(&msg, math::MassMatrix3d( 12.0, - ignition::math::Vector3d(2, 3, 4), - ignition::math::Vector3d(0.1, 0.2, 0.3))); + math::Vector3d(2, 3, 4), + math::Vector3d(0.1, 0.2, 0.3))); EXPECT_DOUBLE_EQ(12.0, msg.mass()); EXPECT_DOUBLE_EQ(2.0, msg.ixx()); @@ -557,7 +557,7 @@ TEST(MsgsTest, SetMassMatrix3) EXPECT_DOUBLE_EQ(0.1, msg.ixy()); EXPECT_DOUBLE_EQ(0.2, msg.ixz()); EXPECT_DOUBLE_EQ(0.3, msg.iyz()); - EXPECT_EQ(ignition::math::Pose3d::Zero, msgs::Convert(msg.pose())); + EXPECT_EQ(math::Pose3d::Zero, msgs::Convert(msg.pose())); } ///////////////////////////////////////////////// diff --git a/src/ign.cc b/src/ign.cc index f2416f62..d8a45c36 100644 --- a/src/ign.cc +++ b/src/ign.cc @@ -47,7 +47,7 @@ void cmdMsgInfo(const char *_msg) { if (_msg) { - auto msg = ignition::msgs::Factory::New(_msg); + auto msg = Factory::New(_msg); if (msg) { auto descriptor = msg->GetDescriptor(); @@ -71,7 +71,7 @@ extern "C" IGNITION_MSGS_VISIBLE void cmdMsgList() { std::vector types; - ignition::msgs::Factory::Types(types); + Factory::Types(types); for (auto const &type : types) std::cout << type << std::endl;