Make a false positive explicit

Pleases coverity
This commit is contained in:
Jean-Marc Lasgouttes 2017-03-08 16:50:03 +01:00
parent 2d86b2debb
commit 000dcb8672

View File

@ -825,7 +825,10 @@ void MathData::collectParameters(Cursor * cur,
}
// put cursor in argument again
if (thisSlice != - 1 && thisPos == int(pos)) {
// Note: The first two expressions on the first line are
// equivalent (see caller), but making this explicit pleases
// coverity.
if (cur && thisSlice != -1 && thisPos == int(pos)) {
cur->append(params.size() - 1, argPos);
cur->append(argSlices);
(*cur)[thisSlice].pos() = macroPos;