From 1ef293d23ffd18727fa6e5fcb23c355aa0985248 Mon Sep 17 00:00:00 2001 From: Martin Piatka <445597@mail.muni.cz> Date: Wed, 31 Jul 2019 10:46:34 +0200 Subject: [PATCH] GUI: Rename macro to not collide with windows definiton --- gui/QT/option/settings_ui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/QT/option/settings_ui.cpp b/gui/QT/option/settings_ui.cpp index d437b113c..778b6840f 100644 --- a/gui/QT/option/settings_ui.cpp +++ b/gui/QT/option/settings_ui.cpp @@ -117,17 +117,17 @@ void vuMeterCallback(Ui::UltragridWindow *win, Option &opt, bool /*suboption*/){ void SettingsUi::addCallbacks(){ using namespace std::placeholders; -#define CALLBACK(opt, fun) { opt, std::bind(fun, this, _1, _2) } +#define OPTION_CALLBACK(opt, fun) { opt, std::bind(fun, this, _1, _2) } const static struct{ const char *opt; std::function callback; } callbacks[] = { - CALLBACK("video.compress", &SettingsUi::jpegLabelCallback), + OPTION_CALLBACK("video.compress", &SettingsUi::jpegLabelCallback), {"audio.compress", std::bind(audioCompressionCallback, mainWin, _1, _2)}, {"advanced", std::bind(&SettingsUi::refreshAll, this)}, {"vuMeter", std::bind(vuMeterCallback, mainWin, _1, _2)}, }; -#undef CALLBACK +#undef OPTION_CALLBACK for(const auto & call : callbacks){ settings->getOption(call.opt).addOnChangeCallback(call.callback);