yuzu/src/core/hle
Lioncash b77430df70 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.
2019-10-17 16:13:14 -04:00
..
kernel core: Remove Core::CurrentProcess() 2019-10-06 13:53:12 -04:00
service apm/controller: Make SetPerformanceConfiguration() use an array of pairs over a map 2019-10-17 16:13:14 -04:00
ipc.h Merge pull request #2090 from FearlessTobi/port-4599 2019-03-20 23:44:20 -04:00
ipc_helpers.h ipc_helpers: Amend floating-point type in Pop<double> specialization 2019-05-18 22:05:33 -04:00
lock.cpp Fix build on macOS and linux 2018-01-13 22:38:52 +00:00
lock.h Use recursive_mutex instead of mutex to fix #2902 2017-08-29 20:39:55 +12:00
result.h hle/result: Remove unnecessary bitfield entry for ResultCode 2019-04-05 16:34:34 -04:00