From edef01a64f9660b5eaf702ce138e27e088d36057 Mon Sep 17 00:00:00 2001 From: Xav83 Date: Fri, 20 Dec 2019 21:26:46 +0100 Subject: [PATCH] Ignores the cppcheck warnings about missing explicit keywords on constructor with one parameter in output_adapters.hpp. --- include/nlohmann/detail/output/output_adapters.hpp | 3 +++ single_include/nlohmann/json.hpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/include/nlohmann/detail/output/output_adapters.hpp b/include/nlohmann/detail/output/output_adapters.hpp index 71ca65b92..2b16eac02 100644 --- a/include/nlohmann/detail/output/output_adapters.hpp +++ b/include/nlohmann/detail/output/output_adapters.hpp @@ -102,12 +102,15 @@ template> class output_adapter { public: + // cppcheck-suppress noExplicitConstructor output_adapter(std::vector& vec) : oa(std::make_shared>(vec)) {} + // cppcheck-suppress noExplicitConstructor output_adapter(std::basic_ostream& s) : oa(std::make_shared>(s)) {} + // cppcheck-suppress noExplicitConstructor output_adapter(StringType& s) : oa(std::make_shared>(s)) {} diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 244244078..fb1cf4808 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -11282,12 +11282,15 @@ template> class output_adapter { public: + // cppcheck-suppress noExplicitConstructor output_adapter(std::vector& vec) : oa(std::make_shared>(vec)) {} + // cppcheck-suppress noExplicitConstructor output_adapter(std::basic_ostream& s) : oa(std::make_shared>(s)) {} + // cppcheck-suppress noExplicitConstructor output_adapter(StringType& s) : oa(std::make_shared>(s)) {}