Bug 100760 - core/vcl/source/control/tabctrl.cxx:1202]: (style) Redundant condition
Summary: core/vcl/source/control/tabctrl.cxx:1202]: (style) Redundant condition
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Gabriel Adriano
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2016-07-04 14:03 UTC by dcb314
Modified: 2017-02-14 08:57 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dcb314 2016-07-04 14:03:53 UTC
core/vcl/source/control/tabctrl.cxx:1202]: (style) Redundant condition: mbHideDisabledTabs. '!A || (A && B)' is equivalent to '!A || B'

Source code is

   if(!mbHideDisabledTabs || (mbHideDisabledTabs && pItem->mbEnabled))
Comment 1 Julien Nabet 2016-07-04 18:52:17 UTC
You're right! (cf http://dev-builds.libreoffice.org/cppcheck_reports/master/)
Would you like to get involved and propose a patch? (see https://wiki.documentfoundation.org/Development/GetInvolved)
Comment 2 dcb314 2016-07-04 19:09:27 UTC
If cppcheck is used on the source code reasonably frequently and
someone is looking at the reports and fixing bugs, then there
is no need for me to be involved further.
Comment 3 jani 2016-07-05 06:08:54 UTC
(In reply to dcb314 from comment #2)
> If cppcheck is used on the source code reasonably frequently and
> someone is looking at the reports and fixing bugs, then there
> is no need for me to be involved further.

cppcheck is used frequently, it runs automatically, but it takes a human to fix bugs, so we need people to be involved.

Please remember this software is made by volunteers, so every little drop helps make the software better.
Comment 4 jani 2016-07-11 06:05:13 UTC
Change status to ASSIGNED
Comment 5 Gabriel Adriano 2016-07-16 00:57:12 UTC
Already fixed by krishna keshav https://gerrit.libreoffice.org/#/c/26984/3