X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fstringcodec%2Fexcept.cpp;h=23ac3cd64f8f48c6992600c6641b887924f27a73;hp=1e1393cf00e99486b46526c94257d9b6c72bcdc3;hb=acafbe566fb6f6b5592a2ec3dec667ba7cd3e7e4;hpb=d16185720fa344263367dbd50c61bfc8183d99a4 diff --git a/source/stringcodec/except.cpp b/source/stringcodec/except.cpp index 1e1393c..23ac3cd 100644 --- a/source/stringcodec/except.cpp +++ b/source/stringcodec/except.cpp @@ -1,4 +1,5 @@ #include +#include #include "except.h" using namespace std; @@ -19,11 +20,7 @@ string invalid_sequence::format_sequence(const string::const_iterator &begin, co { string result; for(string::const_iterator i=begin; i!=end; ++i) - { - if(!result.empty()) - result += ' '; - result += lexical_cast(static_cast(*i), Fmt().fill('0').width(2).hex().uppercase()); - } + append(result, " ", lexical_cast(static_cast(*i), Fmt().fill('0').width(2).hex().uppercase())); return result; }