mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Please Coverity (code should be equivalent)
The parameter passed to allowDisplayMath will need to be copied, so it made sense to pass it by value. Since Coverity complains about that, the code is rewritten to make the copy explicit.
This commit is contained in:
parent
731dbddd11
commit
8cd8080322
@ -1872,13 +1872,14 @@ void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
bool allowDisplayMath(Cursor cur)
|
bool allowDisplayMath(Cursor const & cur)
|
||||||
{
|
{
|
||||||
LATTEST(cur.depth() > 1);
|
LATTEST(cur.depth() > 1);
|
||||||
cur.pop();
|
Cursor tmpcur = cur;
|
||||||
|
tmpcur.pop();
|
||||||
FuncStatus status;
|
FuncStatus status;
|
||||||
FuncRequest cmd(LFUN_MATH_DISPLAY);
|
FuncRequest cmd(LFUN_MATH_DISPLAY);
|
||||||
return cur.getStatus(cmd, status) && status.enabled();
|
return tmpcur.getStatus(cmd, status) && status.enabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user