On 07/09/2014 13:30, David Tardon wrote:
Hi,
On Sat, Sep 06, 2014 at 04:16:43AM -0700, julien2412 wrote:
Hello,
Cppcheck reported this:
1237 incorrectLogicOperator style Logical disjunction always evaluates to
true: nRepeat||!nRepeat.
in svx/source/svdraw/svdotextdecomposition.cxx
Indeed, we've got this:
1236 // loop. In loop, move through
1237 if(nRepeat || 0L == nRepeat)
1238 {
1239 drawinglayer::animation::AnimationEntryLoop aLoop(nRepeat ?
nRepeat : ENDLESS_LOOP);
1240 drawinglayer::animation::AnimationEntryLinear
aThrough(fTimeFullPath, fFrequency, bForward ? 0.0 : 1.0, bForward ? 1.0 :
0.0);
1241 aLoop.append(aThrough);
1242 rAnimList.append(aLoop);
1243 }
See
http://opengrok.libreoffice.org/xref/core/svx/source/svdraw/svdotextdecomposition.cxx#1237
First I thought about removing the test about nRepeat == 0L but line 1239
expects to have nRepeat different or equal to 0.
Any idea?
Just remove the whole test. 0 is a valid value for nRepeat and means an
infinite number of repetitions.
Thank you David for your feedback, I pushed the patch on master. (see
http://cgit.freedesktop.org/libreoffice/core/commit/?id=1b02831d802ab8327a4b73528c7200289f2a0279)
Julien
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice