Instead of calling count() (to first find out whether a key is in the map) and then operator[] (to get the value to the passed key, or default-construct one if not found), use either find() or emplace()`
This is a backport of core#22896
Differential D13350
refactor: net: avoid duplicate map lookups to `mapLocalHost` PiRK on Mar 16 2023, 09:15. Authored by Tags None Subscribers None
Details
Instead of calling count() (to first find out whether a key is in the map) and then operator[] (to get the value to the passed key, or default-construct one if not found), use either find() or emplace()` This is a backport of core#22896 ninja all check-all
Diff Detail
|