mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-02 08:55:53 +00:00
Set boolalpha for Journal::ScopedStream
This commit is contained in:
@@ -110,6 +110,8 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void init ();
|
||||
|
||||
ScopedStream& operator= (ScopedStream const&); // disallowed
|
||||
|
||||
Sink& m_sink;
|
||||
|
||||
@@ -65,18 +65,21 @@ Journal::ScopedStream::ScopedStream (Stream const& stream)
|
||||
: m_sink (stream.sink())
|
||||
, m_severity (stream.severity())
|
||||
{
|
||||
init ();
|
||||
}
|
||||
|
||||
Journal::ScopedStream::ScopedStream (ScopedStream const& other)
|
||||
: m_sink (other.m_sink)
|
||||
, m_severity (other.m_severity)
|
||||
{
|
||||
init ();
|
||||
}
|
||||
|
||||
Journal::ScopedStream::ScopedStream (Stream const& stream, std::ostream& manip (std::ostream&))
|
||||
: m_sink (stream.sink())
|
||||
, m_severity (stream.severity())
|
||||
{
|
||||
init ();
|
||||
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
|
||||
{
|
||||
return m_ostream << manip;
|
||||
|
||||
Reference in New Issue
Block a user