diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-03-24 11:56:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-03-24 11:56:51 +0100 |
| commit | fe3c593910ed2364add3bb06c0b5ea51554c338d (patch) | |
| tree | 1bd64ab8d8cf72865a3c1c81c0c7790ea480a402 /src/verify.cc | |
| parent | 5d002b3c904dd8fbad1bec8af119f3cd06b48d89 (diff) | |
Replace simple uses of raw_convert<string> with fmt.fmt
Diffstat (limited to 'src/verify.cc')
| -rw-r--r-- | src/verify.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/verify.cc b/src/verify.cc index a0c329d0..7df6ed47 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -58,6 +58,7 @@ #include "stereo_picture_frame.h" #include "verify.h" #include "verify_j2k.h" +#include <fmt/format.h> #include <xercesc/dom/DOMAttr.hpp> #include <xercesc/dom/DOMDocument.hpp> #include <xercesc/dom/DOMError.hpp> @@ -591,7 +592,7 @@ verify_main_sound_asset ( verify_language_tag (*lang, notes); } if (asset->sampling_rate() != 48000) { - notes.push_back ({VerificationNote::Type::BV21_ERROR, VerificationNote::Code::INVALID_SOUND_FRAME_RATE, raw_convert<string>(asset->sampling_rate()), *asset->file()}); + notes.push_back ({VerificationNote::Type::BV21_ERROR, VerificationNote::Code::INVALID_SOUND_FRAME_RATE, fmt::to_string(asset->sampling_rate()), *asset->file()}); } } @@ -651,7 +652,7 @@ verify_smpte_timed_text_asset ( auto const size = boost::filesystem::file_size(asset->file().get()); if (size > 115 * 1024 * 1024) { notes.push_back ( - { VerificationNote::Type::BV21_ERROR, VerificationNote::Code::INVALID_TIMED_TEXT_SIZE_IN_BYTES, raw_convert<string>(size), *asset->file() } + { VerificationNote::Type::BV21_ERROR, VerificationNote::Code::INVALID_TIMED_TEXT_SIZE_IN_BYTES, fmt::to_string(size), *asset->file() } ); } @@ -664,7 +665,7 @@ verify_smpte_timed_text_asset ( total_size += i.second.size(); } if (total_size > 10 * 1024 * 1024) { - notes.push_back ({ VerificationNote::Type::BV21_ERROR, VerificationNote::Code::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES, raw_convert<string>(total_size), asset->file().get() }); + notes.push_back ({ VerificationNote::Type::BV21_ERROR, VerificationNote::Code::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES, fmt::to_string(total_size), asset->file().get() }); } if (!asset->start_time()) { @@ -764,7 +765,7 @@ verify_closed_caption_asset ( if (raw_xml) { validate_xml (*raw_xml, xsd_dtd_directory, notes); if (raw_xml->size() > 256 * 1024) { - notes.push_back ({VerificationNote::Type::BV21_ERROR, VerificationNote::Code::INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES, raw_convert<string>(raw_xml->size()), *asset->file()}); + notes.push_back ({VerificationNote::Type::BV21_ERROR, VerificationNote::Code::INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES, fmt::to_string(raw_xml->size()), *asset->file()}); } } else { notes.push_back ({VerificationNote::Type::WARNING, VerificationNote::Code::MISSED_CHECK_OF_ENCRYPTED}); @@ -1483,7 +1484,7 @@ dcp::verify ( if (ffoc == markers_seen.end()) { notes.push_back ({VerificationNote::Type::WARNING, VerificationNote::Code::MISSING_FFOC}); } else if (ffoc->second.e != 1) { - notes.push_back ({VerificationNote::Type::WARNING, VerificationNote::Code::INCORRECT_FFOC, raw_convert<string>(ffoc->second.e)}); + notes.push_back ({VerificationNote::Type::WARNING, VerificationNote::Code::INCORRECT_FFOC, fmt::to_string(ffoc->second.e)}); } auto lfoc = markers_seen.find(Marker::LFOC); @@ -1492,7 +1493,7 @@ dcp::verify ( } else { auto lfoc_time = lfoc->second.as_editable_units_ceil(lfoc->second.tcr); if (lfoc_time != (cpl->reels().back()->duration() - 1)) { - notes.push_back ({VerificationNote::Type::WARNING, VerificationNote::Code::INCORRECT_LFOC, raw_convert<string>(lfoc_time)}); + notes.push_back ({VerificationNote::Type::WARNING, VerificationNote::Code::INCORRECT_LFOC, fmt::to_string(lfoc_time)}); } } |
