[core] Pass the copy flag to JsonString explicitly in the StringRef conversion (#19709)

This commit is contained in:
J. Nick Koston
2026-09-26 00:51:49 +00:00
committed by GitHub
parent a35299af0b
commit a61746045b
+3 -1
View File
@@ -279,7 +279,9 @@ inline void convertToJson(const StringRef &src, JsonVariant dst) {
dst.set("");
return;
}
dst.set(JsonString(src.c_str(), src.size()));
// The explicit isStatic is load bearing: without it clang-tidy reads size() as the bool of the two argument
// constructor and asks for empty() instead
dst.set(JsonString(src.c_str(), src.size(), /* isStatic= */ false));
}
#endif // USE_JSON