Cleanup: white space.
[dcpomatic.git] / src / lib / types.cc
index 3586cdb935b67bc065a55a99592611967eb13706..e9b412ded06bf2709b03601fce9fda9e6bd23325 100644 (file)
 #include "types.h"
 #include "compose.hpp"
 #include "dcpomatic_assert.h"
-#include "warnings.h"
-#include <dcp/raw_convert.h>
 #include <dcp/cpl.h>
 #include <dcp/dcp.h>
-#include <dcp/reel_file_asset.h>
+#include <dcp/raw_convert.h>
 #include <dcp/reel_asset.h>
-DCPOMATIC_DISABLE_WARNINGS
+#include <dcp/reel_file_asset.h>
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
-DCPOMATIC_ENABLE_WARNINGS
+LIBDCP_ENABLE_WARNINGS
 #include <libcxml/cxml.h>
 
 #include "i18n.h"
@@ -214,13 +214,15 @@ CPLSummary::CPLSummary (boost::filesystem::path p)
        encrypted = false;
        for (auto j: dcp.cpls()) {
                for (auto k: j->reel_file_assets()) {
-                       if (k->key_id()) {
+                       if (k->encrypted()) {
                                encrypted = true;
                        }
                }
        }
 
-       last_write_time = boost::filesystem::last_write_time (p);
+       boost::system::error_code ec;
+       auto last_write = boost::filesystem::last_write_time (p, ec);
+       last_write_time = ec ? 0 : last_write;
 }