From: Mikko Rasa Date: Sat, 28 May 2011 10:23:01 +0000 (+0300) Subject: Use format instead of stringstream in TimeDelta X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=commitdiff_plain;h=b01fcd25038798739fed784c222aabdd63eb58d9 Use format instead of stringstream in TimeDelta --- diff --git a/source/time/timedelta.cpp b/source/time/timedelta.cpp index c74ffce..68e8361 100644 --- a/source/time/timedelta.cpp +++ b/source/time/timedelta.cpp @@ -5,8 +5,7 @@ Copyright © 2006 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ -#include -#include +#include #include "timedelta.h" #include "units.h" @@ -16,17 +15,20 @@ namespace { using Msp::Time::RawTime; -void print_part(ostream &out, RawTime &value, RawTime unit, char sep, bool &first) +string format_part(RawTime &value, RawTime unit, char sep, bool &first) { if(value #include -#include +#include #include "types.h" namespace Msp { @@ -83,7 +83,7 @@ public: template inline TimeDelta operator*(T a, const TimeDelta &t) { return t*a; } -extern std::ostream &operator<<(std::ostream &, const TimeDelta &); +void operator<<(LexicalConverter &, const TimeDelta &); } // namespace Time } // namespace Msp