diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-24 04:15:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-24 04:15:26 +0100 |
| commit | ceaf7bc52712cb60708ed5eb5c62c5e463dd8e89 (patch) | |
| tree | c55e4b85ee30138ce83263045d77d01631378b2e /src/interop_load_font_node.cc | |
| parent | 6c37cc1979b2a01205a888c4c98f3334685ee8dd (diff) | |
Tidying.
Diffstat (limited to 'src/interop_load_font_node.cc')
| -rw-r--r-- | src/interop_load_font_node.cc | 17 |
1 files changed, 14 insertions, 3 deletions
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 <cth@carlh.net> + Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net> 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 <libcxml/cxml.h> + 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<string> 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) { |
