Cleanup: use constexpr.
[dcpomatic.git] / src / lib / audio_mapping.cc
index 8b9f102a56fdae460987cac010ee87ab89098178..5e8bf4d04713de054caddefd383eb18167b71395 100644 (file)
 #include "audio_processor.h"
 #include "digester.h"
 #include "util.h"
-#include "warnings.h"
 #include <dcp/raw_convert.h>
+#include <dcp/warnings.h>
 #include <libcxml/cxml.h>
-DCPOMATIC_DISABLE_WARNINGS
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
-DCPOMATIC_ENABLE_WARNINGS
+LIBDCP_ENABLE_WARNINGS
 #include <boost/regex.hpp>
 #include <iostream>
 
@@ -125,7 +125,7 @@ AudioMapping::make_default (AudioProcessor const * processor, optional<boost::fi
                        if (filename) {
                                for (int i = 0; i < regexes; ++i) {
                                        boost::regex e (regex[i].regex, boost::regex::icase);
-                                       if (boost::regex_match(filename->string(), e) && regex[i].channel < output_channels()) {
+                                       if (boost::regex_match(filename->filename().string(), e) && regex[i].channel < output_channels()) {
                                                set (0, regex[i].channel, 1);
                                                guessed = true;
                                        }