Path: Several fixes suggested by wmayer
This commit is contained in:
@@ -109,7 +109,7 @@ Vector3d Command::getCenter (void)
|
||||
return vec;
|
||||
}
|
||||
|
||||
const double Command::getValue(const std::string attr)
|
||||
const double Command::getValue(const std::string& attr)
|
||||
{
|
||||
std::string a(attr);
|
||||
boost::to_upper(a);
|
||||
@@ -119,11 +119,11 @@ const double Command::getValue(const std::string attr)
|
||||
return val;
|
||||
}
|
||||
|
||||
const bool Command::has(const std::string attr)
|
||||
const bool Command::has(const std::string& attr)
|
||||
{
|
||||
std::string a(attr);
|
||||
boost::to_upper(a);
|
||||
return (bool)Parameters.count(a);
|
||||
return Parameters.count(a) > 0;
|
||||
}
|
||||
|
||||
std::string Command::toGCode (void) const
|
||||
@@ -139,7 +139,7 @@ std::string Command::toGCode (void) const
|
||||
return str.str();
|
||||
}
|
||||
|
||||
void Command::setFromGCode (std::string str)
|
||||
void Command::setFromGCode (const std::string& str)
|
||||
{
|
||||
Parameters.clear();
|
||||
std::string mode = "none";
|
||||
|
||||
Reference in New Issue
Block a user