From ff869661d7632bc40aec17d1d42e31f18bd0c40b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 16 Dec 2025 12:23:15 +0100 Subject: Derive verification note type from the code... ...rather than having to specify it each time. --- src/verify.h | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'src/verify.h') diff --git a/src/verify.h b/src/verify.h index a9ebfb44..01d8f6ee 100644 --- a/src/verify.h +++ b/src/verify.h @@ -529,45 +529,38 @@ public: INVALID_PKL_NAMESPACE, }; - VerificationNote (Type type, Code code) - : _type (type) - , _code (code) + VerificationNote(Code code) + : _code(code) {} - VerificationNote (Type type, Code code, std::string note) - : _type (type) - , _code (code) + VerificationNote(Code code, std::string note) + : _code(code) { _data[Data::NOTE] = note; } - VerificationNote (Type type, Code code, boost::filesystem::path file) - : _type (type) - , _code (code) + VerificationNote(Code code, boost::filesystem::path file) + : _code(code) { _data[Data::FILE] = file; } - VerificationNote (Type type, Code code, std::string note, boost::filesystem::path file) - : _type (type) - , _code (code) + VerificationNote(Code code, std::string note, boost::filesystem::path file) + : _code(code) { _data[Data::NOTE] = note; _data[Data::FILE] = file; } - VerificationNote (Type type, Code code, std::string note, boost::filesystem::path file, uint64_t line) - : _type (type) - , _code (code) + VerificationNote(Code code, std::string note, boost::filesystem::path file, uint64_t line) + : _code (code) { _data[Data::NOTE] = note; _data[Data::FILE] = file; _data[Data::LINE] = line; } - Type type () const { - return _type; - } + Type type() const; Code code () const { return _code; @@ -694,7 +687,6 @@ public: } private: - Type _type; Code _code; std::map _data; }; -- cgit v1.2.3