From ea3e922a12ef15549542092904d820d7e5818cd8 Mon Sep 17 00:00:00 2001 From: Aaron Burghardt Date: Mon, 4 May 2015 09:08:55 -0400 Subject: [PATCH] Fix performance regression introduced with the parsing callback feature. --- src/json.hpp.re2c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 9146c44f8..8fa2644fb 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -3964,7 +3964,7 @@ class basic_json auto value = parse_internal(keep); if (keep and keep_tag and not value.is_discarded()) { - result[key] = value; + result[key] = std::move(value); } } while (last_token == lexer::token_type::value_separator); @@ -4015,7 +4015,7 @@ class basic_json auto value = parse_internal(keep); if (keep and not value.is_discarded()) { - result.push_back(value); + result.push_back(std::move(value)); } } while (last_token == lexer::token_type::value_separator); -- GitLab