From 92b7d1cffbd0d457f8b4b23cc72937bcf8e5ed5e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 9 Jan 2022 16:29:21 +0100 Subject: Tidying. --- src/lib/types.cc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/lib/types.cc') diff --git a/src/lib/types.cc b/src/lib/types.cc index 228ebf28f..f08dd63b1 100644 --- a/src/lib/types.cc +++ b/src/lib/types.cc @@ -18,15 +18,16 @@ */ -#include "types.h" + #include "compose.hpp" #include "dcpomatic_assert.h" +#include "types.h" #include "warnings.h" -#include #include #include -#include +#include #include +#include DCPOMATIC_DISABLE_WARNINGS #include DCPOMATIC_ENABLE_WARNINGS @@ -34,6 +35,7 @@ DCPOMATIC_ENABLE_WARNINGS #include "i18n.h" + using std::max; using std::min; using std::string; @@ -42,16 +44,19 @@ using std::shared_ptr; using std::vector; using dcp::raw_convert; + bool operator== (Crop const & a, Crop const & b) { return (a.left == b.left && a.right == b.right && a.top == b.top && a.bottom == b.bottom); } + bool operator!= (Crop const & a, Crop const & b) { return !(a == b); } + /** @param r Resolution. * @return Untranslated string representation. */ @@ -85,6 +90,7 @@ string_to_resolution (string s) return Resolution::TWO_K; } + Crop::Crop (shared_ptr node) { left = node->number_child ("LeftCrop"); @@ -93,6 +99,7 @@ Crop::Crop (shared_ptr node) bottom = node->number_child ("BottomCrop"); } + void Crop::as_xml (xmlpp::Node* node) const { @@ -102,6 +109,7 @@ Crop::as_xml (xmlpp::Node* node) const node->add_child("BottomCrop")->add_child_text (raw_convert (bottom)); } + TextType string_to_text_type (string s) { @@ -116,6 +124,7 @@ string_to_text_type (string s) } } + string text_type_to_string (TextType t) { @@ -131,6 +140,7 @@ text_type_to_string (TextType t) } } + string text_type_to_name (TextType t) { @@ -146,6 +156,7 @@ text_type_to_name (TextType t) } } + string video_frame_type_to_string (VideoFrameType t) { @@ -171,6 +182,7 @@ video_frame_type_to_string (VideoFrameType t) DCPOMATIC_ASSERT (false); } + VideoFrameType string_to_video_frame_type (string s) { @@ -193,6 +205,7 @@ string_to_video_frame_type (string s) DCPOMATIC_ASSERT (false); } + CPLSummary::CPLSummary (boost::filesystem::path p) : dcp_directory (p.leaf().string()) { -- cgit v1.2.3