MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / findShortcut

Function findShortcut

src/Engine/src/Input/ShortcutManager.cpp:9–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7 static ShortcutMap _shortcuts;
8
9 static auto findShortcut(Shortcut id)
10 {
11 auto it = std::lower_bound(std::begin(_shortcuts), std::end(_shortcuts), id, [](const auto& a, const auto& b) {
12 return a.id < b;
13 });
14 if (it == std::end(_shortcuts))
15 {
16 return std::end(_shortcuts);
17 }
18 return it;
19 }
20
21 void add(Shortcut id, StringId displayName, const ShortcutAction& action, const char* configName, const char* defaultBinding)
22 {

Callers 4

addFunction · 0.85
removeFunction · 0.85
executeFunction · 0.85
getNameFunction · 0.85

Calls 2

beginFunction · 0.85
endFunction · 0.85

Tested by

no test coverage detected