Replaced 'emplace' with 'try_emplace' to avoid unnecessary copies or moves when insertion fails.
The 'emplace' function does not guarantee that arguments will not be copied or moved if insertion is not successful. Using 'try_emplace' ensures that arguments are only copied or moved if the insertion actually takes place, thus improving performance.
Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
Replaced 'emplace' with 'try_emplace' to avoid unnecessary copies or moves when insertion fails.
The 'emplace' function does not guarantee that arguments will not be copied or moved if insertion is not successful. Using 'try_emplace' ensures that arguments are only copied or moved if the insertion actually takes place, thus improving performance.
Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>