projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Extract part of the content change job to Content.
[dcpomatic.git]
/
src
/
lib
/
atmos_content.cc
diff --git
a/src/lib/atmos_content.cc
b/src/lib/atmos_content.cc
index 58e009c67273567a6658f2f1faf1b3f508ac8c13..cc74209e0ee8abc4f2a51fd30afca91cda0b2313 100644
(file)
--- a/
src/lib/atmos_content.cc
+++ b/
src/lib/atmos_content.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2020
-2021
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-20,12
+20,16
@@
#include "atmos_content.h"
#include "atmos_content.h"
+#include "warnings.h"
#include <dcp/raw_convert.h>
#include <dcp/raw_convert.h>
+DCPOMATIC_DISABLE_WARNINGS
#include <libxml++/libxml++.h>
#include <libxml++/libxml++.h>
+DCPOMATIC_ENABLE_WARNINGS
+using std::make_shared;
using std::string;
using std::string;
-using
boost
::shared_ptr;
+using
std
::shared_ptr;
int const AtmosContentProperty::EDIT_RATE = 700;
int const AtmosContentProperty::EDIT_RATE = 700;
@@
-50,7
+54,11
@@
AtmosContent::AtmosContent (Content* parent, cxml::ConstNodePtr node)
shared_ptr<AtmosContent>
AtmosContent::from_xml (Content* parent, cxml::ConstNodePtr node)
{
shared_ptr<AtmosContent>
AtmosContent::from_xml (Content* parent, cxml::ConstNodePtr node)
{
- return shared_ptr<AtmosContent> (new AtmosContent(parent, node));
+ if (!node->optional_node_child("AtmosLength")) {
+ return {};
+ }
+
+ return make_shared<AtmosContent>(parent, node);
}
}