mirror of
https://github.com/nlohmann/json.git
synced 2024-08-23 05:22:28 +02:00
Merge branch 'feature/parser_performance' into develop
- improved parser performance by avoiding a copy of the result value
This commit is contained in:
commit
c6d45c30d5
|
@ -8485,7 +8485,7 @@ basic_json_parser_63:
|
||||||
|
|
||||||
// return parser result and replace it with null in case the
|
// return parser result and replace it with null in case the
|
||||||
// top-level value was discarded by the callback function
|
// top-level value was discarded by the callback function
|
||||||
return result.is_discarded() ? basic_json() : result;
|
return result.is_discarded() ? basic_json() : std::move(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -7795,7 +7795,7 @@ class basic_json
|
||||||
|
|
||||||
// return parser result and replace it with null in case the
|
// return parser result and replace it with null in case the
|
||||||
// top-level value was discarded by the callback function
|
// top-level value was discarded by the callback function
|
||||||
return result.is_discarded() ? basic_json() : result;
|
return result.is_discarded() ? basic_json() : std::move(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue