summaryrefslogtreecommitdiff
path: root/src/verify.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-21 01:57:06 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-21 01:57:06 +0100
commit76e3325a16cdf6d7220a61e2b5cfdb9c804cc32c (patch)
tree8c1b5e5dc2cec265469a0d8018b6d7396b089432 /src/verify.cc
parent6c3db78c3d20ef064fa2a0ef38e65ca1ae69adb3 (diff)
Use enum class for the things in types.h
Diffstat (limited to 'src/verify.cc')
-rw-r--r--src/verify.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 3e584ba0..0696541f 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -844,11 +844,11 @@ verify_text_lines_and_characters (
auto position = [](shared_ptr<const SubtitleString> sub) {
switch (sub->v_align()) {
- case VALIGN_TOP:
+ case VAlign::TOP:
return lrintf(sub->v_position() * 100);
- case VALIGN_CENTER:
+ case VAlign::CENTER:
return lrintf((0.5f + sub->v_position()) * 100);
- case VALIGN_BOTTOM:
+ case VAlign::BOTTOM:
return lrintf((1.0f - sub->v_position()) * 100);
}
@@ -1065,7 +1065,7 @@ dcp::verify (
notes.push_back ({VerificationNote::VERIFY_ERROR, VerificationNote::FAILED_READ, string(e.what())});
}
- if (dcp->standard() != SMPTE) {
+ if (dcp->standard() != Standard::SMPTE) {
notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::INVALID_STANDARD});
}
@@ -1095,7 +1095,7 @@ dcp::verify (
}
}
- if (dcp->standard() == SMPTE) {
+ if (dcp->standard() == Standard::SMPTE) {
if (!cpl->annotation_text()) {
notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_CPL_ANNOTATION_TEXT, cpl->id(), cpl->file().get()});
} else if (cpl->annotation_text().get() != cpl->content_title_text()) {
@@ -1158,7 +1158,7 @@ dcp::verify (
}
}
- if (dcp->standard() == SMPTE) {
+ if (dcp->standard() == Standard::SMPTE) {
boost::optional<int64_t> duration;
for (auto i: reel->assets()) {
if (!duration) {
@@ -1224,7 +1224,7 @@ dcp::verify (
most_closed_captions = std::max (most_closed_captions, reel->closed_captions().size());
}
- if (dcp->standard() == SMPTE) {
+ if (dcp->standard() == Standard::SMPTE) {
if (have_main_subtitle && have_no_main_subtitle) {
notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_MAIN_SUBTITLE_FROM_SOME_REELS});
@@ -1234,7 +1234,7 @@ dcp::verify (
notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISMATCHED_CLOSED_CAPTION_ASSET_COUNTS});
}
- if (cpl->content_kind() == FEATURE) {
+ if (cpl->content_kind() == ContentKind::FEATURE) {
if (markers_seen.find(Marker::FFEC) == markers_seen.end()) {
notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_FFEC_IN_FEATURE});
}