X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fstrings%2Fformat.cpp;h=773eefac7fc30698bab7c8d6ebfca8fb1188de18;hp=1b8b4650a9efc852e2ab42268c775d7f5cb858f1;hb=817e584903996a041692640720a5a272d847a3c7;hpb=d16185720fa344263367dbd50c61bfc8183d99a4 diff --git a/source/strings/format.cpp b/source/strings/format.cpp index 1b8b465..773eefa 100644 --- a/source/strings/format.cpp +++ b/source/strings/format.cpp @@ -11,6 +11,20 @@ Formatter::Formatter(const string &f): advance(); } +Formatter::Formatter(const Formatter &other): + fmt(other.fmt), + pos(fmt.begin()+(other.pos-other.fmt.begin())), + result(other.result) +{ } + +Formatter &Formatter::operator=(const Formatter &other) +{ + fmt = other.fmt; + pos = fmt.begin()+(other.pos-other.fmt.begin()); + result = other.result; + return *this; +} + const string &Formatter::str() const { if(pos!=fmt.end())