From 4848e711076c6ebc5d841feb83baeb6d2bc76c94 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Thu, 26 Nov 2020 09:05:59 +0000 Subject: scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD -BEGIN VERIFY SCRIPT- sed -i "s/NODISCARD/[[nodiscard]]/g" $(git grep -l "NODISCARD" ":(exclude)src/bench/nanobench.h" ":(exclude)src/attributes.h") -END VERIFY SCRIPT- --- src/util/system.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/util/system.h') diff --git a/src/util/system.h b/src/util/system.h index 1df194ca84..78ebf751bf 100644 --- a/src/util/system.h +++ b/src/util/system.h @@ -188,7 +188,7 @@ protected: std::map> m_available_args GUARDED_BY(cs_args); std::list m_config_sections GUARDED_BY(cs_args); - NODISCARD bool ReadConfigStream(std::istream& stream, const std::string& filepath, std::string& error, bool ignore_invalid_keys = false); + [[nodiscard]] bool ReadConfigStream(std::istream& stream, const std::string& filepath, std::string& error, bool ignore_invalid_keys = false); /** * Returns true if settings values from the default section should be used, @@ -220,8 +220,8 @@ public: */ void SelectConfigNetwork(const std::string& network); - NODISCARD bool ParseParameters(int argc, const char* const argv[], std::string& error); - NODISCARD bool ReadConfigFiles(std::string& error, bool ignore_invalid_keys = false); + [[nodiscard]] bool ParseParameters(int argc, const char* const argv[], std::string& error); + [[nodiscard]] bool ReadConfigFiles(std::string& error, bool ignore_invalid_keys = false); /** * Log warnings for options in m_section_only_args when -- cgit v1.2.3