From: Mikko Rasa Date: Tue, 2 Nov 2021 09:55:40 +0000 (+0200) Subject: Use the append function to build hex dump X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=3e5d7f41a6771acdcb5b21d2f06b93e555987264;p=libs%2Fgui.git Use the append function to build hex dump --- diff --git a/source/graphics/imageloader.cpp b/source/graphics/imageloader.cpp index 52b0874..e224af6 100644 --- a/source/graphics/imageloader.cpp +++ b/source/graphics/imageloader.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include "bmploader.h" #include "imageloader.h" #ifdef WITH_LIBPNG @@ -73,11 +74,7 @@ ImageLoader *ImageLoader::open_io(IO::Seekable &io) { string sig_hex; for(unsigned i=0; i(sig_buf[i])); - } + append(sig_hex, " ", format("%02X", static_cast(sig_buf[i]))); throw unsupported_image_format(sig_hex); }