diff --git a/app/actions.cpp b/app/actions.cpp index a43f163a..5e933af7 100644 --- a/app/actions.cpp +++ b/app/actions.cpp @@ -926,7 +926,7 @@ int Extract::writeIccProfile(const std::string& target) const { } // Extract::writeIccProfile void Extract::writePreviewFile(const Exiv2::PreviewImage& pvImg, size_t num) const { - std::string pvFile = newFilePath(path_, "-preview") + Exiv2::toString(num); + std::string pvFile = newFilePath(path_, "-preview") + std::to_string(num); std::string pvPath = pvFile + pvImg.extension(); if (dontOverwrite(pvPath)) return; diff --git a/app/exiv2.cpp b/app/exiv2.cpp index f9675b07..863ee61f 100644 --- a/app/exiv2.cpp +++ b/app/exiv2.cpp @@ -1323,14 +1323,14 @@ bool parseLine(ModifyCmd& modifyCmd, const std::string& line, int num) { } #endif throw Exiv2::Error(Exiv2::ErrorCode::kerErrorMessage, - Exiv2::toString(num) + ": " + _("Invalid command line:") + cmdLine); + std::to_string(num) + ": " + _("Invalid command line:") + cmdLine); } std::string cmd(line.substr(cmdStart, cmdEnd - cmdStart)); CmdId cmdId = commandId(cmd); if (cmdId == CmdId::invalid) { throw Exiv2::Error(Exiv2::ErrorCode::kerErrorMessage, - Exiv2::toString(num) + ": " + _("Invalid command") + " `" + cmd + "'"); + std::to_string(num) + ": " + _("Invalid command") + " `" + cmd + "'"); } Exiv2::TypeId defaultType = Exiv2::invalidTypeId; @@ -1361,7 +1361,7 @@ bool parseLine(ModifyCmd& modifyCmd, const std::string& line, int num) { } if (metadataId == MetadataId::invalid) { throw Exiv2::Error(Exiv2::ErrorCode::kerErrorMessage, - Exiv2::toString(num) + ": " + _("Invalid key") + " `" + key + "'"); + std::to_string(num) + ": " + _("Invalid key") + " `" + key + "'"); } } std::string value; @@ -1382,7 +1382,7 @@ bool parseLine(ModifyCmd& modifyCmd, const std::string& line, int num) { if (cmdId == CmdId::reg && (keyEnd == std::string::npos || valStart == std::string::npos)) { throw Exiv2::Error(Exiv2::ErrorCode::kerErrorMessage, - Exiv2::toString(num) + ": " + _("Invalid command line") + " "); + std::to_string(num) + ": " + _("Invalid command line") + " "); } if (cmdId != CmdId::reg && typeStart != std::string::npos && typeEnd != std::string::npos) { @@ -1392,7 +1392,7 @@ bool parseLine(ModifyCmd& modifyCmd, const std::string& line, int num) { valStart = line.find_first_not_of(delim, typeEnd + 1); if (valStart == std::string::npos) { throw Exiv2::Error(Exiv2::ErrorCode::kerErrorMessage, - Exiv2::toString(num) + ": " + _("Invalid command line") + " "); + std::to_string(num) + ": " + _("Invalid command line") + " "); } type = tmpType; explicitType = true; @@ -1418,7 +1418,7 @@ bool parseLine(ModifyCmd& modifyCmd, const std::string& line, int num) { if (cmdId == CmdId::reg) { if (value.empty()) { throw Exiv2::Error(Exiv2::ErrorCode::kerErrorMessage, - Exiv2::toString(num) + ": " + _("Empty value for key") + +" `" + key + "'"); + std::to_string(num) + ": " + _("Empty value for key") + +" `" + key + "'"); } // Registration needs to be done immediately as the new namespaces are diff --git a/samples/prevtest.cpp b/samples/prevtest.cpp index 4ef44141..d843a13a 100644 --- a/samples/prevtest.cpp +++ b/samples/prevtest.cpp @@ -29,7 +29,7 @@ int main(int argc, char* const argv[]) try { << "\n"; Exiv2::PreviewImage preview = loader.getPreviewImage(pos); - auto s = preview.writeFile(filename + "_" + Exiv2::toString(pos.width_) + "x" + Exiv2::toString(pos.height_)); + auto s = preview.writeFile(filename + "_" + std::to_string(pos.width_) + "x" + std::to_string(pos.height_)); if (s == 0) return EXIT_FAILURE; } diff --git a/src/convert.cpp b/src/convert.cpp index 9195e662..4c1c34cc 100644 --- a/src/convert.cpp +++ b/src/convert.cpp @@ -947,7 +947,7 @@ void Converter::cnvXmpDate(const char* from, const char* to) { } if (subsecTag) { prepareExifTarget(subsecTag, true); - (*exifData_)[subsecTag] = toString(datetime.nanoSecond); + (*exifData_)[subsecTag] = std::to_string(datetime.nanoSecond); } } } else { // "Exif.GPSInfo.GPSTimeStamp" diff --git a/src/error.cpp b/src/error.cpp index 4a53e751..f2e212c5 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -165,7 +165,7 @@ void Error::setMsg(int count) { std::string msg{errList.at(static_cast(code_))}; auto pos = msg.find("%0"); if (pos != std::string::npos) { - msg.replace(pos, 2, toString(static_cast(code_))); + msg.replace(pos, 2, std::to_string(static_cast(code_))); } if (count > 0) { pos = msg.find("%1"); diff --git a/src/nikonmn_int.cpp b/src/nikonmn_int.cpp index 83e48aea..fd5e7206 100644 --- a/src/nikonmn_int.cpp +++ b/src/nikonmn_int.cpp @@ -3328,7 +3328,7 @@ std::ostream& Nikon3MakerNote::print0x009e(std::ostream& os, const Value& value, if (td) { s = std::string(exvGettext(td->label_)).append(d).append(s); } else { - s = std::string(_("Unknown")).append(" (").append(toString(l)).append(")").append(d).append(s); + s = std::string(_("Unknown")).append(" (").append(std::to_string(l)).append(")").append(d).append(s); } } return os << s; diff --git a/src/preview.cpp b/src/preview.cpp index 731a8186..87848ffe 100644 --- a/src/preview.cpp +++ b/src/preview.cpp @@ -954,7 +954,7 @@ DataBuf makePnm(size_t width, size_t height, const DataBuf& rgb) { return {}; } - const std::string header = "P6\n" + toString(width) + " " + toString(height) + "\n255\n"; + const std::string header = "P6\n" + std::to_string(width) + " " + std::to_string(height) + "\n255\n"; const auto headerBytes = reinterpret_cast(header.data()); DataBuf dest(header.size() + rgb.size());