Commit 1a131cce3fc134873fd7f87a7395a85daa6c0285
1 parent
16d2b859
Remove stripping of "0" from GApplicationPar::real() method.
This was introduced when a fixed number of 15 decimals was added to the value, which should no longer be needed.
Showing
1 changed file
with
1 additions
and
11 deletions
src/app/GApplicationPar.cpp
| ... | ... | @@ -414,19 +414,9 @@ void GApplicationPar::real(const double& value) |
| 414 | 414 | throw GException::invalid_value(G_REAL_SET, msg); |
| 415 | 415 | } |
| 416 | 416 | |
| 417 | - // Set value string at highest precision | |
| 417 | + // Set value string | |
| 418 | 418 | std::string value_string = gammalib::str(value); |
| 419 | 419 | |
| 420 | - // Strip trailing zeros | |
| 421 | - std::string::size_type start = 0; | |
| 422 | - std::string::size_type stop = value_string.find_last_not_of("0"); | |
| 423 | - if (stop != std::string::npos) { | |
| 424 | - if (start <= stop) { | |
| 425 | - std::string tmp = value_string.substr(start, stop-start+1); | |
| 426 | - value_string = tmp; | |
| 427 | - } | |
| 428 | - } | |
| 429 | - | |
| 430 | 420 | // Set value |
| 431 | 421 | set_value(value_string); |
| 432 | 422 | ... | ... |