Skip to content

Commit

Permalink
add reserve
Browse files Browse the repository at this point in the history
  • Loading branch information
ydot13 committed Sep 13, 2024
1 parent 1514660 commit 9188f41
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/serialize_filters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ InternalValue Serialize::Filter(const InternalValue& value, RenderContext& conte
const auto jsonValue = jsonDoc.CreateValue(value);
const auto jsonString = jsonValue.AsString(static_cast<uint8_t>(indent));
std::string result = ""s;
result.reserve(jsonString.size());
for (char c : jsonString) {
if (c == '<') {
result.append("\\u003c");
Expand Down

0 comments on commit 9188f41

Please sign in to comment.