X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fstrings%2Fformat.cpp;h=773eefac7fc30698bab7c8d6ebfca8fb1188de18;hp=1b8b4650a9efc852e2ab42268c775d7f5cb858f1;hb=c3e242c2629cbc9645258b30aaf07b7285d4372b;hpb=3169ab5078b0ab9147b8e23ad98c0294dda1baec 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())