From 177f42898ac448b4c3683335ce3f95d08e9a3fbf Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 5 Jan 2023 16:34:52 -0300 Subject: [PATCH] Replace std::stringstream() with fmt::format() --- src/dio/aseprite_decoder.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dio/aseprite_decoder.cpp b/src/dio/aseprite_decoder.cpp index 3e210a825..c275fba51 100644 --- a/src/dio/aseprite_decoder.cpp +++ b/src/dio/aseprite_decoder.cpp @@ -1253,10 +1253,11 @@ void AsepriteDecoder::readPropertiesMaps(doc::UserData::PropertiesMaps& properti if (id) { try { extensionId = extFiles.to_fn.at(id); - } catch (std::out_of_range) { + } + catch (const std::out_of_range&) { // This shouldn't happen, but if it does, we put the properties // in an artificial extensionId. - extensionId = (std::stringstream() << "__missed__" << id).str(); + extensionId = fmt::format("__missed__{}", id); delegate()->error( fmt::format("Error: Invalid extension ID (id={0} not found)", id)); }