From 1d301e54da75b90172d129594265f2b629f3125a Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Sun, 20 Dec 2009 19:39:46 +0100 Subject: rot13, demo app for StreamApp, is working :) --- Source/Library/Common/OStream.proto.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Source/Library/Common/OStream.proto.cpp') 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(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; -- cgit v1.2.3