Commit ff9e539c authored by Wouter van Oortmerssen's avatar Wouter van Oortmerssen

Merge pull request #280 from alexames/master

Removed call to pop_back on std::string.
parents feb48166 703b7909
......@@ -68,7 +68,8 @@ template<> inline std::string NumToString<double>(double t) {
auto p = s.find_last_not_of('0');
if (p != std::string::npos) {
s.resize(p + 1); // Strip trailing zeroes.
if (s.back() == '.') s.pop_back(); // Strip '.' if a whole number.
if (s.back() == '.')
s.erase(s.size() - 1, 1); // Strip '.' if a whole number.
}
return s;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment