clang-format

This commit is contained in:
patrick96 2020-05-31 16:31:48 +02:00 committed by Patrick Ziegler
parent 507004df87
commit c60b488501

View File

@ -60,9 +60,10 @@ controller::controller(connection& conn, signal_emitter& emitter, const logger&
, m_bar(forward<decltype(bar)>(bar)) , m_bar(forward<decltype(bar)>(bar))
, m_ipc(forward<decltype(ipc)>(ipc)) , m_ipc(forward<decltype(ipc)>(ipc))
, m_confwatch(forward<decltype(confwatch)>(confwatch)) { , m_confwatch(forward<decltype(confwatch)>(confwatch)) {
if (m_conf.has("settings", "throttle-input-for")) { if (m_conf.has("settings", "throttle-input-for")) {
m_log.warn("The config parameter 'settings.throttle-input-for' is deprecated, it will be removed in the future. Please remove it from your config"); m_log.warn(
"The config parameter 'settings.throttle-input-for' is deprecated, it will be removed in the future. Please "
"remove it from your config");
} }
m_swallow_limit = m_conf.deprecated("settings", "eventqueue-swallow", "throttle-output", m_swallow_limit); m_swallow_limit = m_conf.deprecated("settings", "eventqueue-swallow", "throttle-output", m_swallow_limit);
@ -456,6 +457,7 @@ void controller::process_inputdata() {
* *
* TODO Remove when deprecated action names are removed * TODO Remove when deprecated action names are removed
*/ */
// 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)}}
const std::map<string, std::pair<string, const string>> legacy_actions{ const std::map<string, std::pair<string, const string>> legacy_actions{
@ -509,6 +511,7 @@ void controller::process_inputdata() {
A_MAP("menu-close", menu_module, EVENT_CLOSE), A_MAP("menu-close", menu_module, EVENT_CLOSE),
}; };
#undef A_MAP #undef A_MAP
// clang-format on
// Check if any key in the map is a prefix for the `cmd` // Check if any key in the map is a prefix for the `cmd`
for (const auto& entry : legacy_actions) { for (const auto& entry : legacy_actions) {
@ -530,7 +533,8 @@ void controller::process_inputdata() {
} else { } else {
m_log.warn("The action '%s' is deprecated, use '#%s.%s.%s' instead!", cmd, handler_name, action, data); m_log.warn("The action '%s' is deprecated, use '#%s.%s.%s' instead!", cmd, handler_name, action, data);
} }
m_log.info("Forwarding legacy action '%s' to module '%s' as '%s' with data '%s'", cmd, handler_name, action, data); m_log.info(
"Forwarding legacy action '%s' to module '%s' as '%s' with data '%s'", cmd, handler_name, action, data);
if (!handler_ptr->input(std::forward<string>(action), std::forward<string>(data))) { if (!handler_ptr->input(std::forward<string>(action), std::forward<string>(data))) {
m_log.err("Failed to forward deprecated action to %s module", type); m_log.err("Failed to forward deprecated action to %s module", type);
/* /*