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);