summaryrefslogtreecommitdiff
path: root/src/verify_internal.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-12-16 12:23:15 +0100
committerCarl Hetherington <cth@carlh.net>2025-12-20 01:52:16 +0100
commitff869661d7632bc40aec17d1d42e31f18bd0c40b (patch)
tree9a921beb0fe0f07765abd16247712f89728e9c1d /src/verify_internal.h
parentf8b7b44ac1ea1e6744026beec57465707b04f07f (diff)
Derive verification note type from the code...v1.10.45
...rather than having to specify it each time.
Diffstat (limited to 'src/verify_internal.h')
-rw-r--r--src/verify_internal.h30
1 files changed, 6 insertions, 24 deletions
diff --git a/src/verify_internal.h b/src/verify_internal.h
index d6e3c075..6d30161c 100644
--- a/src/verify_internal.h
+++ b/src/verify_internal.h
@@ -93,30 +93,6 @@ public:
Context(Context const&) = delete;
Context& operator=(Context const&) = delete;
- template<typename... Args>
- void ok(dcp::VerificationNote::Code code, Args... args)
- {
- add_note({dcp::VerificationNote::Type::OK, code, std::forward<Args>(args)...});
- }
-
- template<typename... Args>
- void warning(dcp::VerificationNote::Code code, Args... args)
- {
- add_note({dcp::VerificationNote::Type::WARNING, code, std::forward<Args>(args)...});
- }
-
- template<typename... Args>
- void bv21_error(dcp::VerificationNote::Code code, Args... args)
- {
- add_note({dcp::VerificationNote::Type::BV21_ERROR, code, std::forward<Args>(args)...});
- }
-
- template<typename... Args>
- void error(dcp::VerificationNote::Code code, Args... args)
- {
- add_note({dcp::VerificationNote::Type::ERROR, code, std::forward<Args>(args)...});
- }
-
void add_note(dcp::VerificationNote note)
{
if (cpl) {
@@ -125,6 +101,12 @@ public:
notes.push_back(std::move(note));
}
+ template<typename... Args>
+ void add_note(dcp::VerificationNote::Code code, Args... args)
+ {
+ add_note(dcp::VerificationNote{code, std::forward<Args>(args)...});
+ }
+
void add_note_if_not_existing(dcp::VerificationNote note)
{
if (find(notes.begin(), notes.end(), note) == notes.end()) {