mirror of
https://github.com/nlohmann/json.git
synced 2026-10-22 22:08:55 +00:00
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:
1 file changed
+1
-1
@@ -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) + "}"
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user