diff --git a/samples/write-test.cpp b/samples/write-test.cpp index d62c66da..16ef3bae 100644 --- a/samples/write-test.cpp +++ b/samples/write-test.cpp @@ -128,7 +128,7 @@ void testCase(const std::string& file1, const std::string& file2, const std::str std::cerr << "---> Modifying Exif data\n"; auto pos = ed1.findKey(ek); if (pos == ed1.end()) { - throw Error(ErrorCode::kerErrorMessage, "Metadatum with key = " + ek.key() + " not found"); + throw Error(ErrorCode::kerErrorMessage, "Metadatum with key = ", ek.key(), " not found"); } pos->setValue(value); diff --git a/src/canonmn_int.cpp b/src/canonmn_int.cpp index 3de6946f..704ae0ca 100644 --- a/src/canonmn_int.cpp +++ b/src/canonmn_int.cpp @@ -2911,7 +2911,7 @@ std::ostream& printCsLensTypeByMetadata(std::ostream& os, const Value& value, co if (!std::regex_search(label, base_match, lens_regex)) { // this should never happen, as it would indicate the lens is specified incorrectly // in the CanonCsLensType array - throw Error(ErrorCode::kerErrorMessage, std::string("Lens regex didn't match for: ") + std::string(label)); + throw Error(ErrorCode::kerErrorMessage, "Lens regex didn't match for: ", label); } auto tc = base_match[5].length() > 0 ? std::stof(base_match[5].str()) : 1.f; diff --git a/src/preview.cpp b/src/preview.cpp index 6a0a58f7..21ae651e 100644 --- a/src/preview.cpp +++ b/src/preview.cpp @@ -425,7 +425,7 @@ DataBuf LoaderNative::getData() const { } return {record + sizeHdr + 28, sizeData - 28}; } - throw Error(ErrorCode::kerErrorMessage, "Invalid native preview filter: " + nativePreview_.filter_); + throw Error(ErrorCode::kerErrorMessage, "Invalid native preview filter: ", nativePreview_.filter_); } bool LoaderNative::readDimensions() { diff --git a/src/tags_int.hpp b/src/tags_int.hpp index 33ec7989..6e6e7f2d 100644 --- a/src/tags_int.hpp +++ b/src/tags_int.hpp @@ -231,7 +231,7 @@ std::ostream& printTagBitmask(std::ostream& os, const Value& value, const ExifDa template std::ostream& printTagBitlistAllLE(std::ostream& os, const Value& value, const ExifData*) { if constexpr (N == 0) - throw Error(ErrorCode::kerErrorMessage, std::string("Passed zero length TagDetailsBitlistSorted")); + throw Error(ErrorCode::kerErrorMessage, "Passed zero length TagDetailsBitlistSorted"); uint32_t vN = 0; uint32_t currentVNBit = 0;