diff options
| author | 2018-07-20 17:12:24 -0400 | |
|---|---|---|
| committer | 2018-07-20 17:24:06 -0400 | |
| commit | 6279c2dcf43fb3f4749136b92744d0481e4cf0aa (patch) | |
| tree | 5481381f6bd12189653b7ee06ccefe2cee0b9fa1 /src/common/string_util.cpp | |
| parent | param_package: Get rid of file-static std::string construction (diff) | |
| download | yuzu-6279c2dcf43fb3f4749136b92744d0481e4cf0aa.tar.gz yuzu-6279c2dcf43fb3f4749136b92744d0481e4cf0aa.tar.xz yuzu-6279c2dcf43fb3f4749136b92744d0481e4cf0aa.zip | |
param_package: Use std::unordered_map's insert_or_assign instead of map indexing
This avoids a redundant std::string construction if a key doesn't exist
in the map already.
e.g.
data[key] requires constructing a new default instance of the value in
the map (but this is wasteful, since we're already setting something
into the map over top of it).
Diffstat (limited to 'src/common/string_util.cpp')
0 files changed, 0 insertions, 0 deletions