Skip to content

Commit

Permalink
⚡ replaced by-value call #673
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Aug 1, 2017
1 parent 76ecb2b commit efdfd3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10363,7 +10363,7 @@ class basic_json
*/
template<class ValueType, typename std::enable_if<
std::is_convertible<basic_json_t, ValueType>::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()))
Expand Down Expand Up @@ -10435,7 +10435,7 @@ class basic_json
*/
template<class ValueType, typename std::enable_if<
std::is_convertible<basic_json_t, ValueType>::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()))
Expand Down

0 comments on commit efdfd3a

Please sign in to comment.