X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fstringcodec%2Fexcept.cpp;h=23ac3cd64f8f48c6992600c6641b887924f27a73;hp=b4d07ece559706025677393ea019a9cce39799c0;hb=acafbe566fb6f6b5592a2ec3dec667ba7cd3e7e4;hpb=9955efca718d8be72b63c7c2182ca59e7b9d0935;ds=inline diff --git a/source/stringcodec/except.cpp b/source/stringcodec/except.cpp index b4d07ec..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; }