summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-03-28 21:53:36 +0100
committerCarl Hetherington <cth@carlh.net>2026-03-28 21:53:36 +0100
commit5fe14174334968cbe65454f8f7b14512aa6c50ee (patch)
treeffd128175fdbc452718a58b4013131efbc703d50
parentafb1983635bfb70b129822ecff7de1b1f2052d05 (diff)
Rename size -> size_in_bytes.
-rw-r--r--src/verify.cc8
-rw-r--r--src/verify.h10
-rw-r--r--src/verify_j2k.cc2
-rw-r--r--test/verify_test.cc2
4 files changed, 11 insertions, 11 deletions
diff --git a/src/verify.cc b/src/verify.cc
index c2ef0d41..d8745672 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -2198,7 +2198,7 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str
case VerificationNote::Code::INVALID_JPEG2000_TILE_PART_SIZE:
return compose(
"Frame %1 has an image component that is too large (component %2 is %3 bytes in size).",
- note.frame().get(), note.component().get(), note.size().get()
+ note.frame().get(), note.component().get(), note.size_in_bytes().get()
);
case VerificationNote::Code::INCORRECT_SUBTITLE_NAMESPACE_COUNT:
return compose("The XML in the subtitle asset %1 has more than one namespace declaration.", note.note().get());
@@ -2368,7 +2368,7 @@ dcp::operator== (dcp::VerificationNote const& a, dcp::VerificationNote const& b)
a.line() == b.line() &&
a.frame() == b.frame() &&
a.component() == b.component() &&
- a.size() == b.size() &&
+ a.size_in_bytes() == b.size_in_bytes() &&
a.load_font_id() == b.load_font_id() &&
a.asset_id() == b.asset_id() &&
a.other_asset_id() == b.other_asset_id() &&
@@ -2441,8 +2441,8 @@ dcp::operator< (dcp::VerificationNote const& a, dcp::VerificationNote const& b)
return less_than_optional(a.component(), b.component());
}
- if (a.size() != b.size()) {
- return less_than_optional(a.size(), b.size());
+ if (a.size_in_bytes() != b.size_in_bytes()) {
+ return less_than_optional(a.size_in_bytes(), b.size_in_bytes());
}
if (a.load_font_id() != b.load_font_id()) {
diff --git a/src/verify.h b/src/verify.h
index 5639eae6..eac68f62 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -632,7 +632,7 @@ private:
OTHER_ASSET_ID,
REEL_INDEX, ///< reel index, counting from 0
REFERENCE_HASH,
- SIZE,
+ SIZE_IN_BYTES
};
template <class T>
@@ -676,13 +676,13 @@ public:
return data<int>(Data::COMPONENT);
}
- VerificationNote& set_size(int size) {
- _data[Data::SIZE] = size;
+ VerificationNote& set_size_in_bytes(uint64_t size) {
+ _data[Data::SIZE_IN_BYTES] = size;
return *this;
}
- boost::optional<int> size() const {
- return data<int>(Data::SIZE);
+ boost::optional<uint64_t> size_in_bytes() const {
+ return data<uint64_t>(Data::SIZE_IN_BYTES);
}
VerificationNote& set_load_font_id(std::string id) {
diff --git a/src/verify_j2k.cc b/src/verify_j2k.cc
index c53a1af0..52e4dbf7 100644
--- a/src/verify_j2k.cc
+++ b/src/verify_j2k.cc
@@ -227,7 +227,7 @@ dcp::verify_j2k(shared_ptr<const Data> j2k, int start_index, int frame_index, in
note.set_frame(frame_index);
note.set_frame_rate(dcp::Fraction(frame_rate, 1));
note.set_component(tile_part_index);
- note.set_size(tile_part_length);
+ note.set_size_in_bytes(tile_part_length);
notes.push_back(note);
}
main_header_finished = true;
diff --git a/test/verify_test.cc b/test/verify_test.cc
index 59f2fae1..363aed93 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -5653,7 +5653,7 @@ BOOST_AUTO_TEST_CASE(verify_invalid_tile_part_size)
expected.push_back(
VN(VC::INVALID_JPEG2000_TILE_PART_SIZE)
.set_frame(frame).set_frame_rate(dcp::Fraction(24, 1)).set_component(component)
- .set_size(component_sizes[component]).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(mp->id())
+ .set_size_in_bytes(component_sizes[component]).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(mp->id())
);
}
}