Initialization-order clarification

This commit is contained in:
Jack Andersen 2015-09-02 15:43:20 -10:00
parent 6efe4417d7
commit 805dc19d4a
1 changed files with 4 additions and 5 deletions

View File

@ -95,10 +95,10 @@ public:
}
} m_sbuf;
PyOutStream(BlenderConnection* parent, bool deleteOnError)
: m_parent(parent),
m_sbuf(*this, deleteOnError),
: std::ostream(&m_sbuf),
m_parent(parent),
m_deleteOnError(deleteOnError),
std::ostream(&m_sbuf)
m_sbuf(*this, deleteOnError)
{
m_parent->m_lock = true;
m_parent->_writeLine("PYBEGIN");
@ -110,8 +110,7 @@ public:
public:
PyOutStream(const PyOutStream& other) = delete;
PyOutStream(PyOutStream&& other)
: m_parent(other.m_parent), m_sbuf(std::move(other.m_sbuf)),
std::ostream(&m_sbuf)
: std::ostream(&m_sbuf), m_parent(other.m_parent), m_sbuf(std::move(other.m_sbuf))
{other.m_parent = nullptr;}
~PyOutStream() {close();}
void close()