Remove the unclear FuncStatus::operator|=. Without knowing the internals of FuncStatus it is unsafe to use this operator, so let's not use it.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34161 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-04-16 12:15:27 +00:00
parent 3417702346
commit 5a77a063c1
4 changed files with 3 additions and 15 deletions

View File

@ -1121,15 +1121,13 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
Inset * inset = editedInset(name);
if (inset) {
FuncRequest fr(LFUN_INSET_MODIFY, cmd.argument());
FuncStatus fs;
if (!inset->getStatus(cur, fr, fs)) {
if (!inset->getStatus(cur, fr, flag)) {
// Every inset is supposed to handle this
LASSERT(false, break);
}
flag |= fs;
} else {
FuncRequest fr(LFUN_INSET_INSERT, cmd.argument());
flag |= lyx::getStatus(fr);
flag = lyx::getStatus(fr);
}
break;
}

View File

@ -28,14 +28,6 @@ void FuncStatus::clear()
}
void FuncStatus::operator|=(FuncStatus const & f)
{
v_ |= f.v_;
if (!f.message_.empty())
message_ = f.message_;
}
void FuncStatus::setUnknown(bool b)
{
if (b)

View File

@ -52,8 +52,6 @@ public:
///
void clear();
///
void operator|=(FuncStatus const & f);
///
void setUnknown(bool b);
///
bool unknown() const;

View File

@ -1401,7 +1401,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
GuiToc * toc = static_cast<GuiToc*>(findOrBuild("toc", false));
FuncStatus fs;
if (toc->getStatus(documentBufferView()->cursor(), cmd, fs))
flag |= fs;
flag = fs;
else
flag.setEnabled(false);
return true;