From dfe80724853383a07c5cec6a2452b0a1a0080bc2 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 10 May 2017 11:39:41 +0200 Subject: [PATCH] fixed: workaround portland compiler bug precision(new_precision) returns new, not old precision as it should. this is a non-intrusive workaround --- src/Utility/LogStream.C | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Utility/LogStream.C b/src/Utility/LogStream.C index efd4c9b9..2018362c 100644 --- a/src/Utility/LogStream.C +++ b/src/Utility/LogStream.C @@ -62,8 +62,10 @@ void utl::LogStream::addExtraLog(std::shared_ptr extra, bool clear int utl::LogStream::precision(int streamsize) { int result = streamsize; - if (m_out) - result = m_out->precision(streamsize); + if (m_out) { + result = m_out->precision(); + m_out->precision(streamsize); + } for (auto it : m_extra) it->precision(streamsize); @@ -83,8 +85,10 @@ void utl::LogStream::flush() std::ios_base::fmtflags utl::LogStream::flags(std::ios_base::fmtflags flags) { std::ios_base::fmtflags result = flags; - if (m_out) - result = m_out->flags(flags); + if (m_out) { + result = m_out->flags(); + m_out->flags(flags); + } for (auto it : m_extra) it->flags(flags);