From b11d2cecedcee7b40b76332bd72fe76c9ff671b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B6=99=E4=BF=A1=E8=AA=A0?= Date: Mon, 3 May 2021 13:39:30 +0800 Subject: [PATCH] Fixed cppcheck warning Parameter 'val' can be declared with const in cppcheck. --- single_include/nlohmann/json.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index b3c568b1a..009b29884 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -5937,7 +5937,7 @@ class json_sax_dom_parser return true; } - bool key(string_t& val) + bool key(const string_t& val) { // add null at given key and store the reference for later object_element = &(ref_stack.back()->m_value.object->operator[](val));