Skip to content

Commit

Permalink
optimize variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
guojidan committed Nov 22, 2023
1 parent 8eb50c0 commit 98fd183
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/types/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ struct JsonValue {
jsoncons::jsonpath::json_replace(
value, path, [&append_str, &append_cnt](const std::string & /*path*/, jsoncons::json &origin) {
if (origin.is_string()) {
auto origin_trimmed = origin.as_string();
append_cnt.push_back(origin_trimmed.length() + append_str.length());
origin = origin_trimmed + append_str;
auto origin_str = origin.as_string();
append_cnt.push_back(origin_str.length() + append_str.length());
origin = origin_str + append_str;
} else {
append_cnt.push_back(std::numeric_limits<uint64_t>::max());
}
Expand Down

0 comments on commit 98fd183

Please sign in to comment.