From a240010fbac070dca01b0c0452f57cc35f675d39 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 27 Jun 2024 22:14:21 +0200 Subject: Extract method to a header to make it testable. --- src/verify.cc | 13 ++----------- src/verify.h | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/verify.cc b/src/verify.cc index 112a5bb5..871a9fd1 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -1182,18 +1182,9 @@ verify_closed_caption_details ( } -struct LinesCharactersResult -{ - bool warning_length_exceeded = false; - bool error_length_exceeded = false; - bool line_count_exceeded = false; -}; - - -static void -verify_text_lines_and_characters ( - shared_ptr asset, +dcp::verify_text_lines_and_characters( + shared_ptr asset, int warning_length, int error_length, LinesCharactersResult* result diff --git a/src/verify.h b/src/verify.h index b5d913bd..204d83b0 100644 --- a/src/verify.h +++ b/src/verify.h @@ -58,6 +58,9 @@ namespace dcp { +class SubtitleAsset; + + class VerificationNote { public: @@ -675,6 +678,21 @@ bool operator< (dcp::VerificationNote const& a, dcp::VerificationNote const& b); std::ostream& operator<<(std::ostream& s, dcp::VerificationNote const& note); +struct LinesCharactersResult +{ + bool warning_length_exceeded = false; + bool error_length_exceeded = false; + bool line_count_exceeded = false; +}; + + +extern void verify_text_lines_and_characters( + std::shared_ptr asset, + int warning_length, + int error_length, + dcp::LinesCharactersResult* result + ); + } -- cgit v1.2.3