Cleanup: move EqualityOptions into its own file.
[libdcp.git] / src / reel.cc
index c6049015e425f0680cad6f66945f7e96cec1751b..a8481d593f03db5a8f60517353da65a7d8fd3508 100644 (file)
  */
 
 
-#include "reel.h"
-#include "util.h"
-#include "picture_asset.h"
+#include "decrypted_kdm.h"
+#include "decrypted_kdm_key.h"
+#include "equality_options.h"
+#include "interop_subtitle_asset.h"
 #include "mono_picture_asset.h"
-#include "stereo_picture_asset.h"
-#include "sound_asset.h"
-#include "subtitle_asset.h"
-#include "reel_mono_picture_asset.h"
-#include "reel_stereo_picture_asset.h"
-#include "reel_sound_asset.h"
+#include "picture_asset.h"
+#include "reel.h"
+#include "reel_atmos_asset.h"
+#include "reel_closed_caption_asset.h"
 #include "reel_interop_closed_caption_asset.h"
 #include "reel_interop_subtitle_asset.h"
+#include "reel_markers_asset.h"
+#include "reel_mono_picture_asset.h"
 #include "reel_smpte_closed_caption_asset.h"
 #include "reel_smpte_subtitle_asset.h"
+#include "reel_sound_asset.h"
+#include "reel_stereo_picture_asset.h"
 #include "reel_subtitle_asset.h"
-#include "reel_markers_asset.h"
-#include "decrypted_kdm_key.h"
-#include "decrypted_kdm.h"
-#include "interop_subtitle_asset.h"
 #include "smpte_subtitle_asset.h"
-#include "reel_atmos_asset.h"
-#include "reel_closed_caption_asset.h"
+#include "sound_asset.h"
+#include "stereo_picture_asset.h"
+#include "subtitle_asset.h"
+#include "util.h"
 #include <libxml++/nodes/element.h>
 #include <stdint.h>
 
@@ -179,7 +180,7 @@ Reel::write_to_cpl (xmlpp::Element* node, Standard standard) const
 
 
 bool
-Reel::equals (std::shared_ptr<const Reel> other, EqualityOptions opt, NoteHandler note) const
+Reel::equals(std::shared_ptr<const Reel> other, EqualityOptions const& opt, NoteHandler note) const
 {
        if ((_main_picture && !other->_main_picture) || (!_main_picture && other->_main_picture)) {
                note (NoteType::ERROR, "Reel: picture assets differ");
@@ -365,9 +366,9 @@ Reel::add (shared_ptr<ReelAsset> asset)
                _closed_captions.push_back (c);
        } else if (auto a = dynamic_pointer_cast<ReelAtmosAsset>(asset)) {
                _atmos = a;
+       } else {
+               DCP_ASSERT(false);
        }
-
-       DCP_ASSERT(false);
 }