From bc8893fcd762eb76602acab4bcff3a330f024180 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 4 Mar 2009 14:59:20 +0000 Subject: [PATCH] remove now unused LeftJustified classs (it is perfectly correctly coded, but crashes on intel macs on leopard, so forget it) git-svn-id: svn://svn.icculus.org/netradiant/trunk@209 61c419a2-8eb2-4b30-bcec-8cead039b335 --- libs/stream/textstream.h | 53 ---------------------------------------- 1 file changed, 53 deletions(-) diff --git a/libs/stream/textstream.h b/libs/stream/textstream.h index fff8a45..60a7821 100644 --- a/libs/stream/textstream.h +++ b/libs/stream/textstream.h @@ -252,59 +252,6 @@ inline TextOutputStreamType& ostream_write(TextOutputStreamType& ostream, const return ostream; } -template -class LeftJustified -{ -public: - const T& m_t; - std::size_t m_size; - LeftJustified(const T& t, std::size_t size) : m_t(t), m_size(size) - { - } -}; - -template -LeftJustified makeLeftJustified(const T& t, std::size_t size) -{ - return LeftJustified(t, size); -} - -template -class CountingOutputStream -{ - TextOutputStreamType& m_ostream; -public: - std::size_t m_count; - CountingOutputStream(TextOutputStreamType& ostream) : m_ostream(ostream) - { - } - std::size_t write(const char* buffer, std::size_t length) - { - m_count += length; - return m_ostream.write(buffer, length); - } -}; - -template -inline CountingOutputStream& operator<<(CountingOutputStream& ostream, const T& t) -{ - return ostream_write(ostream, t); -} - - -/// \brief Writes any type to \p ostream padded with spaces afterwards. -template -inline TextOutputStreamType& ostream_write(TextOutputStreamType& ostream, const LeftJustified& justified) -{ - CountingOutputStream count(ostream); - count << justified.m_t; - while(justified.m_size > count.m_count) - { - count << ' '; - } - return ostream; -} - class FloatFormat { public: -- 2.39.2