Skip to content

Commit

Permalink
Revert changes to pose section of ValueFromString
Browse files Browse the repository at this point in the history
  • Loading branch information
scpeters committed May 8, 2020
1 parent 9daad39 commit 8f6120c
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/Param.cc
Original file line number Diff line number Diff line change
Expand Up @@ -417,21 +417,11 @@ bool Param::ValueFromString(const std::string &_value)
this->dataPtr->typeName == "pose" ||
this->dataPtr->typeName == "Pose")
{
// if the value is an empty string or white space we avoid parsing since
// its considered a valid value
auto isWhiteSpace = [](unsigned char _c)
{
return std::isspace(_c);
};

if (!tmp.empty() || !std::all_of(tmp.begin(), tmp.end(), isWhiteSpace))
{
StringStreamClassicLocale ss(tmp);
ignition::math::Pose3d posetmp;
StringStreamClassicLocale ss(tmp);
ignition::math::Pose3d posetmp;

ss >> posetmp;
this->dataPtr->value = posetmp;
}
ss >> posetmp;
this->dataPtr->value = posetmp;
}
else if (this->dataPtr->typeName == "ignition::math::Quaterniond" ||
this->dataPtr->typeName == "quaternion")
Expand Down

0 comments on commit 8f6120c

Please sign in to comment.