From 22e41da4a15460da454b08a3cc0b41607e7e1cf9 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Mon, 8 Aug 2022 20:44:12 -0700 Subject: [PATCH] Remove redundant namespace references Signed-off-by: methylDragon --- plugins/gazebo_factory/GazeboFactory.cc | 4 ++-- plugins/gazebo_gui/GazeboGui.cc | 14 ++++++------- plugins/gazebo_server/GazeboServer.cc | 28 ++++++++++++------------- plugins/joy_to_twist/JoyToTwist.cc | 2 +- plugins/joystick/Joystick.cc | 2 +- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/plugins/gazebo_factory/GazeboFactory.cc b/plugins/gazebo_factory/GazeboFactory.cc index 8790ac79..ee4cd98a 100644 --- a/plugins/gazebo_factory/GazeboFactory.cc +++ b/plugins/gazebo_factory/GazeboFactory.cc @@ -27,7 +27,7 @@ using namespace ignition::launch; ///////////////////////////////////////////////// GazeboFactory::GazeboFactory() - : ignition::launch::Plugin() + : launch::Plugin() { } @@ -123,7 +123,7 @@ void GazeboFactory::ProcessSpawn(const tinyxml2::XMLElement *_elem) elem = _elem->FirstChildElement("pose"); if (elem) { - ignition::math::Pose3d pose; + math::Pose3d pose; std::stringstream stream; stream << elem->GetText(); stream >> pose; diff --git a/plugins/gazebo_gui/GazeboGui.cc b/plugins/gazebo_gui/GazeboGui.cc index e0efc5e8..1951d6a2 100644 --- a/plugins/gazebo_gui/GazeboGui.cc +++ b/plugins/gazebo_gui/GazeboGui.cc @@ -32,7 +32,7 @@ using namespace ignition::launch; ///////////////////////////////////////////////// GazeboGui::GazeboGui() - : ignition::launch::Plugin() + : launch::Plugin() { } @@ -49,18 +49,18 @@ bool GazeboGui::Load(const tinyxml2::XMLElement *_elem) // Set default config file for Launch std::string defaultConfigPath; - ignition::common::env(IGN_HOMEDIR, defaultConfigPath); - defaultConfigPath = ignition::common::joinPaths(defaultConfigPath, + common::env(IGN_HOMEDIR, defaultConfigPath); + defaultConfigPath = common::joinPaths(defaultConfigPath, ".ignition", "launch"); - auto defaultConfigFile = ignition::common::joinPaths(defaultConfigPath, + auto defaultConfigFile = common::joinPaths(defaultConfigPath, "gui.config"); // Check if there's a default config file under // ~/.ignition/launch and use that. If there isn't, create it - if (!ignition::common::exists(defaultConfigFile)) + if (!common::exists(defaultConfigFile)) { - ignition::common::createDirectories(defaultConfigPath); + common::createDirectories(defaultConfigPath); std::ofstream configFile(defaultConfigFile); if (configFile.is_open()) @@ -100,7 +100,7 @@ bool GazeboGui::Load(const tinyxml2::XMLElement *_elem) auto app = gazebo::gui::createGui(argc, argv, defaultConfigFile.c_str(), defaultConfigFile.c_str(), false); - auto win = app->findChild()->QuickWindow(); + auto win = app->findChild()->QuickWindow(); // Customize window std::string windowTitle{"Gazebo"}; diff --git a/plugins/gazebo_server/GazeboServer.cc b/plugins/gazebo_server/GazeboServer.cc index 3a6882d1..394c8d01 100644 --- a/plugins/gazebo_server/GazeboServer.cc +++ b/plugins/gazebo_server/GazeboServer.cc @@ -52,7 +52,7 @@ void copyElement(sdf::ElementPtr _sdf, const tinyxml2::XMLElement *_xml) ///////////////////////////////////////////////// GazeboServer::GazeboServer() - : ignition::launch::Plugin() + : launch::Plugin() { } @@ -116,7 +116,7 @@ bool GazeboServer::Load(const tinyxml2::XMLElement *_elem) // Update compressed file path to name of recording directory path std::string cmpPath = std::string(recordPathMod); - if (!std::string(1, cmpPath.back()).compare(ignition::common::separator(""))) + if (!std::string(1, cmpPath.back()).compare(common::separator(""))) // Remove the separator at end of path cmpPath = cmpPath.substr(0, cmpPath.length() - 1); cmpPath += ".zip"; @@ -132,30 +132,30 @@ bool GazeboServer::Load(const tinyxml2::XMLElement *_elem) { // Update compressed file path to name of recording directory path cmpPath = std::string(recordPathMod); - if (!std::string(1, cmpPath.back()).compare(ignition::common::separator( + if (!std::string(1, cmpPath.back()).compare(common::separator( ""))) // Remove the separator at end of path cmpPath = cmpPath.substr(0, cmpPath.length() - 1); cmpPath += ".zip"; // Check if path or compressed file with same prefix exists - if (ignition::common::exists(recordPathMod) || - ignition::common::exists(cmpPath)) + if (common::exists(recordPathMod) || + common::exists(cmpPath)) { // Overwrite if flag specified if (overwrite) { bool recordMsg = false, cmpMsg = false; // Remove files before initializing console log files on top of them - if (ignition::common::exists(recordPathMod)) + if (common::exists(recordPathMod)) { recordMsg = true; - ignition::common::removeAll(recordPathMod); + common::removeAll(recordPathMod); } - if (ignition::common::exists(cmpPath)) + if (common::exists(cmpPath)) { cmpMsg = true; - ignition::common::removeFile(cmpPath); + common::removeFile(cmpPath); } // Create log file before printing any messages so they can be logged @@ -180,21 +180,21 @@ bool GazeboServer::Load(const tinyxml2::XMLElement *_elem) { // Remove the separator at end of path if (!std::string(1, recordPathMod.back()).compare( - ignition::common::separator(""))) + common::separator(""))) recordPathMod = recordPathMod.substr(0, recordPathMod.length() - 1); - recordPathMod = ignition::common::uniqueDirectoryPath(recordPathMod); + recordPathMod = common::uniqueDirectoryPath(recordPathMod); cmpPath = std::string(recordPathMod); // Remove the separator at end of path if (!std::string(1, cmpPath.back()).compare( - ignition::common::separator(""))) + common::separator(""))) cmpPath = cmpPath.substr(0, cmpPath.length() - 1); cmpPath += ".zip"; // If compressed file exists, rename again - if (ignition::common::exists(cmpPath)) + if (common::exists(cmpPath)) { - cmpPath = ignition::common::uniqueFilePath(recordPathMod, "zip"); + cmpPath = common::uniqueFilePath(recordPathMod, "zip"); size_t extIdx = cmpPath.find_last_of("."); recordPathMod = cmpPath.substr(0, extIdx); diff --git a/plugins/joy_to_twist/JoyToTwist.cc b/plugins/joy_to_twist/JoyToTwist.cc index f971a010..b262f25d 100644 --- a/plugins/joy_to_twist/JoyToTwist.cc +++ b/plugins/joy_to_twist/JoyToTwist.cc @@ -45,7 +45,7 @@ void setVectorFromString(const std::string &_str, ///////////////////////////////////////////////// JoyToTwist::JoyToTwist() - : ignition::launch::Plugin() + : Plugin() { } diff --git a/plugins/joystick/Joystick.cc b/plugins/joystick/Joystick.cc index 4e1ddd03..99f8122f 100644 --- a/plugins/joystick/Joystick.cc +++ b/plugins/joystick/Joystick.cc @@ -31,7 +31,7 @@ using namespace ignition::launch; ///////////////////////////////////////////////// Joystick::Joystick() - : ignition::launch::Plugin() + : Plugin() { }