Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ign -> gz : Remove redundant namespace references #190

Merged
merged 1 commit into from
Aug 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/gazebo_factory/GazeboFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ using namespace ignition::launch;

/////////////////////////////////////////////////
GazeboFactory::GazeboFactory()
: ignition::launch::Plugin()
: launch::Plugin()
{
}

Expand Down Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions plugins/gazebo_gui/GazeboGui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ using namespace ignition::launch;

/////////////////////////////////////////////////
GazeboGui::GazeboGui()
: ignition::launch::Plugin()
: launch::Plugin()
{
}

Expand All @@ -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())
Expand Down Expand Up @@ -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<ignition::gui::MainWindow *>()->QuickWindow();
auto win = app->findChild<gui::MainWindow *>()->QuickWindow();

// Customize window
std::string windowTitle{"Gazebo"};
Expand Down
28 changes: 14 additions & 14 deletions plugins/gazebo_server/GazeboServer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void copyElement(sdf::ElementPtr _sdf, const tinyxml2::XMLElement *_xml)

/////////////////////////////////////////////////
GazeboServer::GazeboServer()
: ignition::launch::Plugin()
: launch::Plugin()
{
}

Expand Down Expand Up @@ -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";
Expand All @@ -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
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion plugins/joy_to_twist/JoyToTwist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void setVectorFromString(const std::string &_str,

/////////////////////////////////////////////////
JoyToTwist::JoyToTwist()
: ignition::launch::Plugin()
: Plugin()
{
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/joystick/Joystick.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ using namespace ignition::launch;

/////////////////////////////////////////////////
Joystick::Joystick()
: ignition::launch::Plugin()
: Plugin()
{
}

Expand Down