mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: stringOps: open OStringStream with fixed precision so floating point numbers get preserved
This commit is contained in:
@ -328,6 +328,10 @@ Foam::string& Foam::stringOps::inplaceExpand
|
||||
if (ePtr)
|
||||
{
|
||||
OStringStream buf;
|
||||
// Force floating point numbers to be printed with at least
|
||||
// some decimal digits.
|
||||
buf << fixed;
|
||||
buf.precision(IOstream::defaultPrecision());
|
||||
if (ePtr->isDict())
|
||||
{
|
||||
ePtr->dict().write(buf, false);
|
||||
|
||||
Reference in New Issue
Block a user