Skip to content

Commit

Permalink
remove + from Error()
Browse files Browse the repository at this point in the history
No need for it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
  • Loading branch information
neheb committed Mar 28, 2024
1 parent b6e1360 commit 3bccfa8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion samples/write-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/canonmn_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/preview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/tags_int.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ std::ostream& printTagBitmask(std::ostream& os, const Value& value, const ExifDa
template <size_t N, const TagDetailsBitlistSorted (&array)[N]>
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;
Expand Down

0 comments on commit 3bccfa8

Please sign in to comment.