From 503a73b1832dde9685a44c2ee9cc904e39aeaee4 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Tue, 13 Aug 2024 22:35:40 +0400 Subject: cmJSONHelpers.h: Use `map::emplace()` instead of `operator[]` --- Source/cmJSONHelpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmJSONHelpers.h b/Source/cmJSONHelpers.h index fe5dca5..b35825d 100644 --- a/Source/cmJSONHelpers.h +++ b/Source/cmJSONHelpers.h @@ -348,7 +348,7 @@ struct cmJSONHelperBuilder if (!func(t, &(*value)[key], state)) { success = false; } - out[key] = std::move(t); + out.emplace(key, std::move(t)); state->pop_stack(); } return success; -- cgit v0.12