From ceaf7bc52712cb60708ed5eb5c62c5e463dd8e89 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 24 Jan 2021 04:15:26 +0100 Subject: Tidying. --- src/interop_load_font_node.cc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/interop_load_font_node.cc') diff --git a/src/interop_load_font_node.cc b/src/interop_load_font_node.cc index a5bc1428..40f12dde 100644 --- a/src/interop_load_font_node.cc +++ b/src/interop_load_font_node.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2015 Carl Hetherington + Copyright (C) 2012-2021 Carl Hetherington This file is part of libdcp. @@ -31,14 +31,22 @@ files in the program, then also delete it here. */ + +/** @file src/interop_load_font_node.cc + * @brief InteropLoadFontNode class + */ + + #include "interop_load_font_node.h" #include + using std::string; using std::shared_ptr; using boost::optional; using namespace dcp; + InteropLoadFontNode::InteropLoadFontNode (string id_, string uri_) : LoadFontNode (id_) , uri (uri_) @@ -46,23 +54,26 @@ InteropLoadFontNode::InteropLoadFontNode (string id_, string uri_) } + InteropLoadFontNode::InteropLoadFontNode (cxml::ConstNodePtr node) { - optional x = node->optional_string_attribute ("Id"); + auto x = node->optional_string_attribute("Id"); if (!x) { - x = node->optional_string_attribute ("ID"); + x = node->optional_string_attribute("ID"); } id = x.get_value_or (""); uri = node->string_attribute ("URI"); } + bool dcp::operator== (InteropLoadFontNode const & a, InteropLoadFontNode const & b) { return a.id == b.id && a.uri == b.uri; } + bool dcp::operator!= (InteropLoadFontNode const & a, InteropLoadFontNode const & b) { -- cgit v1.2.3