mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Set boolalpha for Journal::ScopedStream
This commit is contained in:
@@ -110,6 +110,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void init ();
|
||||||
|
|
||||||
ScopedStream& operator= (ScopedStream const&); // disallowed
|
ScopedStream& operator= (ScopedStream const&); // disallowed
|
||||||
|
|
||||||
Sink& m_sink;
|
Sink& m_sink;
|
||||||
|
|||||||
@@ -65,18 +65,21 @@ Journal::ScopedStream::ScopedStream (Stream const& stream)
|
|||||||
: m_sink (stream.sink())
|
: m_sink (stream.sink())
|
||||||
, m_severity (stream.severity())
|
, m_severity (stream.severity())
|
||||||
{
|
{
|
||||||
|
init ();
|
||||||
}
|
}
|
||||||
|
|
||||||
Journal::ScopedStream::ScopedStream (ScopedStream const& other)
|
Journal::ScopedStream::ScopedStream (ScopedStream const& other)
|
||||||
: m_sink (other.m_sink)
|
: m_sink (other.m_sink)
|
||||||
, m_severity (other.m_severity)
|
, m_severity (other.m_severity)
|
||||||
{
|
{
|
||||||
|
init ();
|
||||||
}
|
}
|
||||||
|
|
||||||
Journal::ScopedStream::ScopedStream (Stream const& stream, std::ostream& manip (std::ostream&))
|
Journal::ScopedStream::ScopedStream (Stream const& stream, std::ostream& manip (std::ostream&))
|
||||||
: m_sink (stream.sink())
|
: m_sink (stream.sink())
|
||||||
, m_severity (stream.severity())
|
, m_severity (stream.severity())
|
||||||
{
|
{
|
||||||
|
init ();
|
||||||
m_ostream << manip;
|
m_ostream << manip;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,6 +92,17 @@ Journal::ScopedStream::~ScopedStream ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Journal::ScopedStream::init ()
|
||||||
|
{
|
||||||
|
// Modifiers applied from all ctors
|
||||||
|
m_ostream
|
||||||
|
<< std::boolalpha
|
||||||
|
<< std::showbase
|
||||||
|
//<< std::hex
|
||||||
|
;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
std::ostream& Journal::ScopedStream::operator<< (std::ostream& manip (std::ostream&)) const
|
std::ostream& Journal::ScopedStream::operator<< (std::ostream& manip (std::ostream&)) const
|
||||||
{
|
{
|
||||||
return m_ostream << manip;
|
return m_ostream << manip;
|
||||||
|
|||||||
Reference in New Issue
Block a user