Commit 51c3e944 authored by Marius Pa's avatar Marius Pa
Browse files

PVS-Studio issue "kcalc_button.cpp:80: warning: V768 The variable...

PVS-Studio issue "kcalc_button.cpp:80: warning: V768 The variable 'mode_flags_' is of enum type. It is odd that it is used as a variable of a Boolean-type."
parent 029c5b8b
Pipeline #194175 passed with stage
in 1 minute and 13 seconds
......@@ -77,7 +77,7 @@ void KCalcButton::slotSetMode(ButtonModeFlags mode, bool flag)
if (flag) { // if the specified mode is to be set (i.e. flag = true)
new_mode = ButtonModeFlags(mode_flags_ | mode);
} else if (mode_flags_ && mode) { // if the specified mode is to be cleared (i.e. flag = false)
} else if (mode_flags_ & mode) { // if the specified mode is to be cleared (i.e. flag = false)
new_mode = ButtonModeFlags(mode_flags_ - mode);
} else {
return; // nothing to do
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment