Clear Coverity STREAM_FORMAT_STATE (CID 177735)
This was a valid finding in the Test suite. The stream state findings are annoying.pull/398/head
parent
e6817b73e5
commit
1bfb6be934
|
|
@ -126,7 +126,7 @@ class StreamState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
StreamState(std::ostream& out)
|
StreamState(std::ostream& out)
|
||||||
: m_out(out), m_fmt(out.flags()), m_prec(out.precision())
|
: m_out(out), m_fmt(out.flags()), m_prec(out.precision()), m_fill(out.fill())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -134,12 +134,14 @@ public:
|
||||||
{
|
{
|
||||||
m_out.precision(m_prec);
|
m_out.precision(m_prec);
|
||||||
m_out.flags(m_fmt);
|
m_out.flags(m_fmt);
|
||||||
|
m_out.fill(m_fill);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::ostream& m_out;
|
std::ostream& m_out;
|
||||||
std::ios_base::fmtflags m_fmt;
|
std::ios_base::fmtflags m_fmt;
|
||||||
std::streamsize m_prec;
|
std::streamsize m_prec;
|
||||||
|
char m_fill;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Safer functions on Windows for C&A, https://github.com/weidai11/cryptopp/issues/55
|
// Safer functions on Windows for C&A, https://github.com/weidai11/cryptopp/issues/55
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue