b77430df70
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. |
||
---|---|---|
.. | ||
arm | ||
crypto | ||
file_sys | ||
frontend | ||
gdbstub | ||
hle | ||
loader | ||
memory | ||
tools | ||
CMakeLists.txt | ||
constants.cpp | ||
constants.h | ||
core_cpu.cpp | ||
core_cpu.h | ||
core_timing_util.cpp | ||
core_timing_util.h | ||
core_timing.cpp | ||
core_timing.h | ||
core.cpp | ||
core.h | ||
cpu_core_manager.cpp | ||
cpu_core_manager.h | ||
hardware_interrupt_manager.cpp | ||
hardware_interrupt_manager.h | ||
memory_setup.h | ||
memory.cpp | ||
memory.h | ||
perf_stats.cpp | ||
perf_stats.h | ||
reporter.cpp | ||
reporter.h | ||
settings.cpp | ||
settings.h | ||
telemetry_session.cpp | ||
telemetry_session.h |