Commit 703b7909 authored by Alex Ames's avatar Alex Ames

Removed call to pop_back on std::string.

The pop_back function was added to strings in C++11 and it appears not
all compilers we target support it. The call to pop_back has been
replaced with a call to erase.

Tested on Linux. All unit tests pass.
parent 811a5c33
......@@ -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