X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FFuncStatus.cpp;h=9b936869ac5280777abc38d21c8a70e1d0450518;hb=28be7d552f62cc02fa86d7f79201d089bfb2d7b5;hp=17e59e677ded3666dfb11a794b1d020f6305f2b4;hpb=f630be890494c849981e4fb52ea4740506e92bed;p=lyx.git diff --git a/src/FuncStatus.cpp b/src/FuncStatus.cpp index 17e59e677d..9b936869ac 100644 --- a/src/FuncStatus.cpp +++ b/src/FuncStatus.cpp @@ -17,8 +17,7 @@ namespace lyx { FuncStatus::FuncStatus() : v_(OK) -{ -} +{} void FuncStatus::clear() @@ -28,20 +27,12 @@ void FuncStatus::clear() } -void FuncStatus::operator|=(FuncStatus const & f) -{ - v_ |= f.v_; - if (!f.message_.empty()) - message_ = f.message_; -} - - -void FuncStatus::unknown(bool b) +void FuncStatus::setUnknown(bool b) { if (b) v_ |= UNKNOWN; else - v_ &= !UNKNOWN; + v_ &= ~UNKNOWN; } @@ -52,10 +43,10 @@ bool FuncStatus::unknown() const } -void FuncStatus::enabled(bool b) +void FuncStatus::setEnabled(bool b) { if (b) - v_ &= !DISABLED; + v_ &= ~DISABLED; else v_ |= DISABLED; } @@ -73,7 +64,7 @@ void FuncStatus::setOnOff(bool b) } -bool FuncStatus::onoff(bool b) const +bool FuncStatus::onOff(bool b) const { if (b) return (v_ & ON);