aboutsummaryrefslogtreecommitdiff
path: root/src/core/memory/dmnt_cheat_vm.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-10-17 16:10:24 -0400
committerLioncash <mathew1800@gmail.com>2019-10-17 16:13:14 -0400
commit76157b0b040419eaa50dc0bccd74195b562cf6ce (patch)
tree28812c67beed8fc5f6a2e555f50818827bd6b6a7 /src/core/memory/dmnt_cheat_vm.cpp
parent756203599ea6f3697bf2970fcbeb8ca570b4f989 (diff)
apm/controller: Make SetPerformanceConfiguration() use an array of pairs over a map
While a map is an OK way to do lookups (and usually recommended in most cases), this is a map that lives for the entire duration of the program and only deallocates its contents when the program terminates. Given the total size of the map is quite small, we can simply use a std::array of pairs and utilize std::find_if to perform the same behavior without loss of performance. This eliminates a static constructor and places the data into the read-only segment. While we're at it, we can also handle malformed inputs instead of directly dereferencing the resulting iterator.
Diffstat (limited to 'src/core/memory/dmnt_cheat_vm.cpp')
0 files changed, 0 insertions, 0 deletions