From 1a131cce3fc134873fd7f87a7395a85daa6c0285 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Fri, 7 Oct 2016 17:25:34 +0200 Subject: [PATCH] Remove stripping of "0" from GApplicationPar::real() method. --- src/app/GApplicationPar.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/app/GApplicationPar.cpp b/src/app/GApplicationPar.cpp index 30681d6..069789e 100644 --- a/src/app/GApplicationPar.cpp +++ b/src/app/GApplicationPar.cpp @@ -414,19 +414,9 @@ void GApplicationPar::real(const double& value) throw GException::invalid_value(G_REAL_SET, msg); } - // Set value string at highest precision + // Set value string std::string value_string = gammalib::str(value); - // Strip trailing zeros - std::string::size_type start = 0; - std::string::size_type stop = value_string.find_last_not_of("0"); - if (stop != std::string::npos) { - if (start <= stop) { - std::string tmp = value_string.substr(start, stop-start+1); - value_string = tmp; - } - } - // Set value set_value(value_string); -- libgit2 0.21.4