🔨 improved performance in dump for deeply nested values

parent f697fec5
...@@ -6789,9 +6789,9 @@ class basic_json ...@@ -6789,9 +6789,9 @@ class basic_json
// variable to hold indentation for recursive calls // variable to hold indentation for recursive calls
const auto new_indent = current_indent + indent_step; const auto new_indent = current_indent + indent_step;
if (indent_string.size() < new_indent) if (JSON_UNLIKELY(indent_string.size() < new_indent))
{ {
indent_string.resize(new_indent, ' '); indent_string.resize(indent_string.size() * 2, ' ');
} }
// first n-1 elements // first n-1 elements
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment