controller: Use unordered_map for legacy actions

This commit is contained in:
patrick96 2020-05-31 21:16:13 +02:00 committed by Patrick Ziegler
parent 41ffc3607d
commit 1193b78e43

View File

@ -412,7 +412,7 @@ bool controller::try_forward_legacy_action(const string& cmd) {
// clang-format off // clang-format off
#define A_MAP(old, module_name, event) {old, {string(module_name::TYPE), string(module_name::event)}} #define A_MAP(old, module_name, event) {old, {string(module_name::TYPE), string(module_name::event)}}
static const std::map<string, std::pair<string, const string>> legacy_actions{ static const std::unordered_map<string, std::pair<string, const string>> legacy_actions{
A_MAP("datetoggle", date_module, EVENT_TOGGLE), A_MAP("datetoggle", date_module, EVENT_TOGGLE),
#if ENABLE_ALSA #if ENABLE_ALSA
A_MAP("volup", alsa_module, EVENT_INC), A_MAP("volup", alsa_module, EVENT_INC),