Fixed reference + do not clear stream in adapters.
This commit is contained in:
parent
ae0cd86c4f
commit
64d91947c3
@ -158,6 +158,8 @@ void charsetConverter::convert(utility::inputStream& in, utility::outputStream&
|
|||||||
|
|
||||||
void charsetConverter::convert(const string& in, string& out)
|
void charsetConverter::convert(const string& in, string& out)
|
||||||
{
|
{
|
||||||
|
out.clear();
|
||||||
|
|
||||||
utility::inputStreamStringAdapter is(in);
|
utility::inputStreamStringAdapter is(in);
|
||||||
utility::outputStreamStringAdapter os(out);
|
utility::outputStreamStringAdapter os(out);
|
||||||
|
|
||||||
|
@ -112,7 +112,6 @@ void outputStreamAdapter::flush()
|
|||||||
outputStreamStringAdapter::outputStreamStringAdapter(string& buffer)
|
outputStreamStringAdapter::outputStreamStringAdapter(string& buffer)
|
||||||
: m_buffer(buffer)
|
: m_buffer(buffer)
|
||||||
{
|
{
|
||||||
m_buffer.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -134,7 +133,6 @@ void outputStreamStringAdapter::flush()
|
|||||||
outputStreamByteArrayAdapter::outputStreamByteArrayAdapter(byteArray& array)
|
outputStreamByteArrayAdapter::outputStreamByteArrayAdapter(byteArray& array)
|
||||||
: m_array(array)
|
: m_array(array)
|
||||||
{
|
{
|
||||||
m_array.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
byteArray m_array;
|
byteArray& m_array;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user