From efdfd3aa5b171912453aab3adea3c6a1d1e93ee3 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 1 Aug 2017 19:37:25 +0200 Subject: [PATCH] :zap: replaced by-value call #673 --- src/json.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index 26e0b4f4..b0bad35e 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -10363,7 +10363,7 @@ class basic_json */ template::value, int>::type = 0> - ValueType value(const typename object_t::key_type& key, ValueType default_value) const + ValueType value(const typename object_t::key_type& key, const ValueType& default_value) const { // at only works for objects if (JSON_LIKELY(is_object())) @@ -10435,7 +10435,7 @@ class basic_json */ template::value, int>::type = 0> - ValueType value(const json_pointer& ptr, ValueType default_value) const + ValueType value(const json_pointer& ptr, const ValueType& default_value) const { // at only works for objects if (JSON_LIKELY(is_object()))