Fix boost bind placeholder warnings.
[libdcp.git] / tools / dcpverify.cc
index 23023fa342ebcb7bfdb862c7233d6fc27e69adf4..770dd78fa75c93bf9f37df5e2329f15dbf17ca56 100644 (file)
     files in the program, then also delete it here.
 */
 
-#include "verify.h"
-#include "compose.hpp"
+
 #include "common.h"
+#include "compose.hpp"
 #include "raw_convert.h"
-#include <boost/bind.hpp>
-#include <boost/optional.hpp>
+#include "verify.h"
+#include "version.h"
+#include <boost/bind/bind.hpp>
 #include <boost/filesystem.hpp>
+#include <boost/optional.hpp>
 #include <getopt.h>
 #include <iostream>
 #include <cstdlib>
 
-using std::cout;
+
 using std::cerr;
+using std::cout;
+using std::list;
 using std::string;
 using std::vector;
-using std::list;
 using boost::bind;
 using boost::optional;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
+
 
 static void
 help (string n)
@@ -98,7 +105,7 @@ main (int argc, char* argv[])
 
                switch (c) {
                case 'V':
-                       cout << "dcpverify version " << LIBDCP_VERSION << "\n";
+                       cout << "dcpverify version " << dcp::version << "\n";
                        exit (EXIT_SUCCESS);
                case 'h':
                        help (argv[0]);
@@ -196,10 +203,15 @@ main (int argc, char* argv[])
        }
 
        if (!failed && !quiet) {
-               if (bv21_failed || warned) {
-                       cout << "\n";
+               if (bv21_failed && warned) {
+                       cout << "\nDCP verified OK (but with Bv2.1 errors and warnings).\n";
+               } else if (bv21_failed) {
+                       cout << "\nDCP verified OK (but with Bv2.1 errors).\n";
+               } else if (warned) {
+                       cout << "\nDCP verified OK (but with warnings).\n";
+               } else {
+                       cout << "DCP verified OK.\n";
                }
-               cout << "DCP verified OK.\n";
        }
 
        exit (failed ? EXIT_FAILURE : EXIT_SUCCESS);