summaryrefslogtreecommitdiff
path: root/src/lib/video_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-07-09 22:53:27 +0200
committerCarl Hetherington <cth@carlh.net>2025-07-10 20:50:32 +0200
commit62c34b28567a097e8f22576e7d7891bd3dbe0ac0 (patch)
tree2a0440ed2bdb58c608582b75da6c877527dd6bda /src/lib/video_content.cc
parent2c499921a9f8615c8368d8161cb43c9a93c67311 (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/video_content.cc')
-rw-r--r--src/lib/video_content.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc
index 3f2819082..a51ebc8e2 100644
--- a/src/lib/video_content.cc
+++ b/src/lib/video_content.cc
@@ -322,7 +322,7 @@ VideoContent::take_from_examiner(shared_ptr<const Film> film, shared_ptr<VideoEx
_has_alpha = has_alpha;
}
- LOG_GENERAL("Video length obtained from header as %1 frames", _length);
+ LOG_GENERAL("Video length obtained from header as {} frames", _length);
if (d->video_frame_rate()) {
_parent->set_video_frame_rate(film, d->video_frame_rate().get());
@@ -362,16 +362,16 @@ VideoContent::identifier() const
string
VideoContent::technical_summary() const
{
- string const size_string = size() ? String::compose("%1x%2", size()->width, size()->height) : _("unknown");
+ string const size_string = size() ? fmt::format("{}x{}", size()->width, size()->height) : _("unknown");
- string s = String::compose(
- N_("video: length %1 frames, size %2"),
+ string s = fmt::format(
+ N_("video: length {} frames, size {}"),
length_after_3d_combine(),
size_string
);
if (sample_aspect_ratio()) {
- s += String::compose(N_(", sample aspect ratio %1"), sample_aspect_ratio().get());
+ s += fmt::format(N_(", sample aspect ratio {}"), sample_aspect_ratio().get());
}
return s;
@@ -450,8 +450,8 @@ VideoContent::processing_description(shared_ptr<const Film> film)
char buffer[256];
if (size() && size()->width && size()->height) {
- d += String::compose(
- _("Content video is %1x%2"),
+ d += fmt::format(
+ _("Content video is {}x{}"),
size_after_3d_split()->width,
size_after_3d_split()->height
);
@@ -474,8 +474,8 @@ VideoContent::processing_description(shared_ptr<const Film> film)
if ((crop.left || crop.right || crop.top || crop.bottom) && size() != dcp::Size(0, 0)) {
auto const cropped = size_after_crop();
if (cropped) {
- d += String::compose(
- _("\nCropped to %1x%2"),
+ d += fmt::format(
+ _("\nCropped to {}x{}"),
cropped->width, cropped->height
);
@@ -488,8 +488,8 @@ VideoContent::processing_description(shared_ptr<const Film> film)
auto const scaled = scaled_size(container_size);
if (scaled && *scaled != size_after_crop()) {
- d += String::compose(
- _("\nScaled to %1x%2"),
+ d += fmt::format(
+ _("\nScaled to {}x{}"),
scaled->width, scaled->height
);
@@ -498,8 +498,8 @@ VideoContent::processing_description(shared_ptr<const Film> film)
}
if (scaled && *scaled != container_size) {
- d += String::compose(
- _("\nPadded with black to fit container %1 (%2x%3)"),
+ d += fmt::format(
+ _("\nPadded with black to fit container {} ({}x{})"),
film->container().container_nickname(),
container_size.width, container_size.height
);
@@ -526,7 +526,7 @@ VideoContent::add_properties(list<UserProperty>& p) const
{
p.push_back(UserProperty(UserProperty::VIDEO, _("Length"), length(), _("video frames")));
if (auto s = size()) {
- p.push_back(UserProperty(UserProperty::VIDEO, _("Size"), String::compose("%1x%2", s->width, s->height)));
+ p.push_back(UserProperty(UserProperty::VIDEO, _("Size"), fmt::format("{}x{}", s->width, s->height)));
}
}