Examples of errors detected by the V765 diagnostic
V765. Compound assignment expression 'X += X + N' is suspicious. Consider inspecting it for a possible error.
MuseScore
V765 A compound assignment expression 'x += x + ...' is suspicious. Consider inspecting it for a possible error. tremolo.cpp 321
void Tremolo::layout()
{
....
if (_chord1->up() != _chord2->up()) {
beamYOffset += beamYOffset + beamHalfLineWidth; // <=
}
else if (!_chord1->up() && !_chord2->up()) {
beamYOffset = -beamYOffset;
}
....
}
LibreOffice
V765 A compound assignment expression 'x -= x - ...' is suspicious. Consider inspecting it for a possible error. swdtflvr.cxx 3509
bool SwTransferable::PrivateDrop(...)
{
....
if ( rSrcSh.IsSelFrameMode() )
{
//Hack: fool the special treatment
aSttPt -= aSttPt - rSrcSh.GetObjRect().Pos();
}
....
}