More adventures in the art of enum namespacing.
authorCarl Hetherington <cth@carlh.net>
Sat, 14 Dec 2019 23:09:57 +0000 (00:09 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 22 Dec 2019 00:21:00 +0000 (01:21 +0100)
src/verify.cc
test/verify_test.cc
tools/common.cc

index 89150e2f99187698f9528bace07b1451dd11faae..ca53a4c1c2968cd863e7656c3dc4368e6352bf27 100644 (file)
@@ -280,7 +280,7 @@ validate_xml (boost::filesystem::path xml_file, boost::filesystem::path xsd_dtd_
                notes.push_back (
                        VerificationNote(
                                VerificationNote::VERIFY_ERROR,
-                               VerificationNote::Code::XML_VALIDATION_ERROR,
+                               VerificationNote::XML_VALIDATION_ERROR,
                                i.message(),
                                xml_file,
                                i.line()
@@ -345,9 +345,9 @@ dcp::verify (
                try {
                        dcp->read (&notes);
                } catch (DCPReadError& e) {
-                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::Code::GENERAL_READ, string(e.what())));
+                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::GENERAL_READ, string(e.what())));
                } catch (XMLError& e) {
-                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::Code::GENERAL_READ, string(e.what())));
+                       notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::GENERAL_READ, string(e.what())));
                }
 
                BOOST_FOREACH (shared_ptr<CPL> cpl, dcp->cpls()) {
index 9ac19adabadfd034ecbcb86b459da1582af3c018..38316f546488401fda565a5ce75fb27f0b518436 100644 (file)
@@ -346,7 +346,7 @@ BOOST_AUTO_TEST_CASE (verify_test6)
 
        BOOST_REQUIRE_EQUAL (notes.size(), 1);
        BOOST_CHECK_EQUAL (notes.front().type(), dcp::VerificationNote::VERIFY_ERROR);
-       BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::Code::MISSING_ASSET);
+       BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::MISSING_ASSET);
 }
 
 static
@@ -362,7 +362,7 @@ BOOST_AUTO_TEST_CASE (verify_test7)
        check_after_replace (
                        7, &assetmap,
                        "<Path>video.mxf</Path>", "<Path></Path>",
-                       dcp::VerificationNote::Code::EMPTY_ASSET_PATH
+                       dcp::VerificationNote::EMPTY_ASSET_PATH
                        );
 }
 
@@ -372,9 +372,9 @@ BOOST_AUTO_TEST_CASE (verify_test8)
        check_after_replace (
                        8, &cpl,
                        "http://www.smpte-ra.org/schemas/429-7/2006/CPL", "http://www.digicine.com/PROTO-ASDCP-CPL-20040511#",
-                       dcp::VerificationNote::Code::MISMATCHED_STANDARD,
-                       dcp::VerificationNote::Code::XML_VALIDATION_ERROR,
-                       dcp::VerificationNote::Code::CPL_HASH_INCORRECT
+                       dcp::VerificationNote::MISMATCHED_STANDARD,
+                       dcp::VerificationNote::XML_VALIDATION_ERROR,
+                       dcp::VerificationNote::CPL_HASH_INCORRECT
                        );
 }
 
@@ -385,7 +385,7 @@ BOOST_AUTO_TEST_CASE (verify_test9)
        check_after_replace (
                        9, &cpl,
                        "<Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b", "<Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375",
-                       dcp::VerificationNote::Code::XML_VALIDATION_ERROR
+                       dcp::VerificationNote::XML_VALIDATION_ERROR
                        );
 }
 
@@ -395,8 +395,8 @@ BOOST_AUTO_TEST_CASE (verify_test10)
        check_after_replace (
                        10, &cpl,
                        "<IssueDate>", "<IssueDate>x",
-                       dcp::VerificationNote::Code::XML_VALIDATION_ERROR,
-                       dcp::VerificationNote::Code::CPL_HASH_INCORRECT
+                       dcp::VerificationNote::XML_VALIDATION_ERROR,
+                       dcp::VerificationNote::CPL_HASH_INCORRECT
                        );
 }
 
@@ -406,7 +406,7 @@ BOOST_AUTO_TEST_CASE (verify_test11)
        check_after_replace (
                11, &pkl,
                "<Id>urn:uuid:ae8", "<Id>urn:uuid:xe8",
-               dcp::VerificationNote::Code::XML_VALIDATION_ERROR
+               dcp::VerificationNote::XML_VALIDATION_ERROR
                );
 }
 
@@ -416,6 +416,6 @@ BOOST_AUTO_TEST_CASE (verify_test12)
        check_after_replace (
                12, &asset_map,
                "<Id>urn:uuid:74e", "<Id>urn:uuid:x4e",
-               dcp::VerificationNote::Code::XML_VALIDATION_ERROR
+               dcp::VerificationNote::XML_VALIDATION_ERROR
                );
 }
index 7ae3dae07e5691c71d82d35c2c05c8f8fd647877..91dba995874eee28f7b4e07552b84d5322b3fa17 100644 (file)
@@ -46,7 +46,7 @@ dcp::filter_notes (list<dcp::VerificationNote>& notes, bool ignore_missing_asset
                list<dcp::VerificationNote>::iterator tmp = i;
                ++tmp;
 
-               if (ignore_missing_assets && i->code() == dcp::VerificationNote::Code::MISSING_ASSET) {
+               if (ignore_missing_assets && i->code() == dcp::VerificationNote::MISSING_ASSET) {
                        notes.erase (i);
                }