Fixed bug in Parser<double|float>Item.cpp:

Too low precision for floating point values in generated source code.
This commit is contained in:
chflo
2015-04-17 18:53:39 +02:00
committed by Joakim Hove
parent 09275419e1
commit d70504e7a4
2 changed files with 2 additions and 2 deletions

View File

@@ -136,7 +136,7 @@ namespace Opm
void ParserDoubleItem::inlineNew(std::ostream& os) const {
os << "new ParserDoubleItem(" << "\"" << name() << "\"" << "," << ParserItemSizeEnum2String( sizeType() );
if (m_defaultSet)
os << "," << getDefault();
os << "," << boost::lexical_cast<std::string>(getDefault());
os << ")";
}

View File

@@ -134,7 +134,7 @@ namespace Opm
void ParserFloatItem::inlineNew(std::ostream& os) const {
os << "new ParserFloatItem(" << "\"" << name() << "\"" << "," << ParserItemSizeEnum2String( sizeType() );
if (m_defaultSet)
os << "," << getDefault();
os << "," << boost::lexical_cast<std::string>(getDefault());
os << ")";
}