Skip to content

Commit

Permalink
Remove redundant namespace references
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <methylDragon@gmail.com>
  • Loading branch information
methylDragon committed Aug 9, 2022
1 parent 1715173 commit 8dfd7f4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
12 changes: 6 additions & 6 deletions src/PointCloudPackedUtils_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()};
Expand Down
46 changes: 23 additions & 23 deletions src/Utility_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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);

Expand All @@ -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());
Expand All @@ -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()));
}

/////////////////////////////////////////////////
Expand Down Expand Up @@ -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());
Expand All @@ -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());
Expand All @@ -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()));
}

/////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions src/ign.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -71,7 +71,7 @@ extern "C" IGNITION_MSGS_VISIBLE
void cmdMsgList()
{
std::vector<std::string> types;
ignition::msgs::Factory::Types(types);
Factory::Types(types);

for (auto const &type : types)
std::cout << type << std::endl;
Expand Down

0 comments on commit 8dfd7f4

Please sign in to comment.