Bind the parser test's strings by reference in the range-for loop

GCC and Clang 14 (-Wrange-loop-construct) reported the copy.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-10-22 13:39:52 +02:00
1 parent f5cb977387
commit 334ca64683
1 file changed
+1 -1
+1 -1
View File
@@ -2970,7 +2970,7 @@ TEST_CASE("accept() agrees with parse() on floats around the overflow limit")
for (const char* number : numbers)
{
for (const std::string text :
for (const std::string& text :
{
std::string(number), "[" + std::string(number) + "]", "{\"a\":" + std::string(number) + "}"
})