Page MenuHomePhabricator

refactor: net: avoid duplicate map lookups to `mapLocalHost`
ClosedPublic

Authored by PiRK on Mar 16 2023, 09:15.

Details

Summary

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

Test Plan

ninja all check-all