diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-07-09 22:53:27 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-07-10 20:50:32 +0200 |
| commit | 62c34b28567a097e8f22576e7d7891bd3dbe0ac0 (patch) | |
| tree | 2a0440ed2bdb58c608582b75da6c877527dd6bda /src/lib/util.cc | |
| parent | 2c499921a9f8615c8368d8161cb43c9a93c67311 (diff) | |
Replace String::compose with fmt.
sed -i "/Plural-Forms/n;/%100/n;/scanf/n;s/%[123456789]/{}/g" src/lib/*.cc src/lib/*.h src/wx/*.cc src/tools/*.cc src/lib/po/*.po src/wx/po/*.po src/tools/po/*.po test/*.cc
sed -i "s/String::compose */fmt::format/g" src/lib/*.cc src/lib/*.h src/wx/*.cc src/tools/*.cc test/*.cc
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index eeab9f2d6..e1eaed9b9 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -383,7 +383,7 @@ public: if (entry.TestFilter(m_filter)) { string buffer; entry.CreateStringWithOptions(buffer, m_options); - LOG_GENERAL("asdcplib: %1", buffer); + LOG_GENERAL("asdcplib: {}", buffer); } } }; @@ -410,7 +410,7 @@ ffmpeg_log_callback(void* ptr, int level, const char* fmt, va_list vl) av_log_format_line(ptr, level, fmt, vl, line, sizeof(line), &prefix); string str(line); boost::algorithm::trim(str); - dcpomatic_log->log(String::compose("FFmpeg: %1", str), LogEntry::TYPE_GENERAL); + dcpomatic_log->log(fmt::format("FFmpeg: {}", str), LogEntry::TYPE_GENERAL); } @@ -462,7 +462,7 @@ LIBDCP_ENABLE_WARNINGS if (running_tests) { putenv("FONTCONFIG_PATH=fonts"); } else { - putenv(String::compose("FONTCONFIG_PATH=%1", resources_path().string()).c_str()); + putenv(fmt::format("FONTCONFIG_PATH={}", resources_path().string()).c_str()); } #endif @@ -981,9 +981,9 @@ decrypt_kdm_with_helpful_error(dcp::EncryptedKDM kdm) } } if (!on_chain) { - throw KDMError(variant::insert_dcpomatic(_("This KDM was not made for %1's decryption certificate.")), e.what()); + throw KDMError(variant::insert_dcpomatic(_("This KDM was not made for {}'s decryption certificate.")), e.what()); } else if (kdm_subject_name != dc->leaf().subject()) { - throw KDMError(variant::insert_dcpomatic(_("This KDM was made for %1 but not for its leaf certificate.")), e.what()); + throw KDMError(variant::insert_dcpomatic(_("This KDM was made for {} but not for its leaf certificate.")), e.what()); } else { throw; } @@ -1029,7 +1029,7 @@ start_of_thread(string) string error_details(boost::system::error_code ec) { - return String::compose("%1:%2:%3", ec.category().name(), ec.value(), ec.message()); + return fmt::format("{}:{}:{}", ec.category().name(), ec.value(), ec.message()); } @@ -1133,7 +1133,7 @@ screen_names_to_string(vector<string> names) string report_problem() { - return String::compose(_("Please report this problem by using Help -> Report a problem or via email to %1"), variant::report_problem_email()); + return fmt::format(_("Please report this problem by using Help -> Report a problem or via email to {}"), variant::report_problem_email()); } |
