diff options
author | Alexis211 <alexis211@gmail.com> | 2009-12-20 19:39:46 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-12-20 19:39:46 +0100 |
commit | 1d301e54da75b90172d129594265f2b629f3125a (patch) | |
tree | 1eb918a01ef7677c4328ef1d23a2538647448f0b /Source/Library/Common/OStream.proto.cpp | |
parent | 13d720389a01161a327a30918ad7ac9eec4a3d6c (diff) | |
download | Melon-1d301e54da75b90172d129594265f2b629f3125a.tar.gz Melon-1d301e54da75b90172d129594265f2b629f3125a.zip |
rot13, demo app for StreamApp, is working :)
Diffstat (limited to 'Source/Library/Common/OStream.proto.cpp')
-rw-r--r-- | Source/Library/Common/OStream.proto.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Library/Common/OStream.proto.cpp b/Source/Library/Common/OStream.proto.cpp index ba876b3..f0667e7 100644 --- a/Source/Library/Common/OStream.proto.cpp +++ b/Source/Library/Common/OStream.proto.cpp @@ -11,6 +11,7 @@ OStream::OStream(const OStream& other) { } void OStream::put(const String &s) { + if (s.empty()) return; waitLock(); if (m_buffer == NULL or m_last == NULL) { m_buffer = m_last = new SimpleList<String>(s); @@ -55,8 +56,9 @@ OStream& OStream::operator<< (ostream_modifiers_e m) { flush(); } else if (m == ENDL) { put("\n"); + flush(); } else if (m == END) { - put(String(EOF, 1)); + put(EOF); flush(); } return *this; |