Commit 093b3333 authored by Francis Dupont's avatar Francis Dupont

[429-Updated-StampedValue-to-support-reals] Fixed the 7.0 issue

parent ca62c0ae
......@@ -114,7 +114,14 @@ StampedValue::getValue() const {
case Element::boolean:
return (value_->boolValue() ? "1" : "0");
case Element::real:
return (boost::lexical_cast<std::string>(value_->doubleValue()));
{
std::string repr =
boost::lexical_cast<std::string>(value_->doubleValue());
if (repr.find_first_of('.') == std::string::npos) {
repr += ".0";
}
return (repr);
}
default:
// Impossible condition.
isc_throw(TypeError, "StampedValue: invalid type of the '"
......@@ -125,6 +132,7 @@ StampedValue::getValue() const {
isc_throw(BadValue, "StampedValue: unable to convert the value of "
"the parameter '" << name_ << "' to string");
}
// unreachable
return (value_->stringValue());
}
......
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