More c++ tidying.
[dcpomatic.git] / src / lib / atmos_content.cc
index 58e009c67273567a6658f2f1faf1b3f508ac8c13..e69474e01807756763c7f24fa4890a7a97358e56 100644 (file)
 
 
 #include "atmos_content.h"
+#include "warnings.h"
 #include <dcp/raw_convert.h>
+DCPOMATIC_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+DCPOMATIC_ENABLE_WARNINGS
 
 
 using std::string;
-using boost::shared_ptr;
+using std::shared_ptr;
 
 
 int const AtmosContentProperty::EDIT_RATE = 700;
@@ -50,6 +53,10 @@ AtmosContent::AtmosContent (Content* parent, cxml::ConstNodePtr node)
 shared_ptr<AtmosContent>
 AtmosContent::from_xml (Content* parent, cxml::ConstNodePtr node)
 {
+       if (!node->optional_node_child("AtmosLength")) {
+               return shared_ptr<AtmosContent>();
+       }
+
        return shared_ptr<AtmosContent> (new AtmosContent(parent, node));
 }