Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


On Fri, 2013-12-13 at 15:26 -0800, julien2412 wrote:
Hello,

Cppcheck reported this:
[sw/source/ui/docvw/edtwin.cxx:3322] ->
[sw/source/ui/docvw/edtwin.cxx:3322]: (style) Same expression on both sides
of '&&'

Indeed we have:
   3319                         // if the cursor position was corrected or
if a Fly
   3320                         // was selected in ReadOnlyMode, no word
selection.
   3321                         if ( !bValidCrsrPos ||
   3322                             (rSh.IsFrmSelected() &&
rSh.IsFrmSelected() ))
   3323                             return;

git history indicates it's like this since initial import in (2000-03-18)
Of course I could remove one rSh.IsFrmSelected() but not sure at all when
reading comment above.

On line 3388 we have the exact same comment and same condition, except
this time its not duplicating the IsFrmSelected test which swung the
vote for me. So I removed the redundant check on this 3321 line to match
it.

C.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.