Bug 344555 - src/part/canvaselement.cpp:201: bad use of ? : operator * 2
Summary: src/part/canvaselement.cpp:201: bad use of ? : operator * 2
Status: RESOLVED FIXED
Alias: None
Product: kgraphviewer
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Gaël de Chalendar (aka Kleag)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-25 11:41 UTC by dcb314
Modified: 2017-08-02 12:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dcb314 2015-02-25 11:41:08 UTC
kgraphviewer-2.2.0/src/part/canvaselement.cpp:201]: (style) Same expression in both branches of ternary operator.

          x = ((*it).integers[2*i+1] == m_wdhcf)?(*it).integers[2*i+1]:(*it).integers[2*i+1]/*%m_wdhcf*/;

Same thing on the next line too

          y = ((*it).integers[2*i+2] == m_hdvcf)?(*it).integers[2*i+2]:(*it).integers[2*i+2]/*%m_hdvcf*/;


Reproducible: Always

Steps to Reproduce:
1. apply static analyser cppcheck to source code
2.
3.
Comment 1 Gaël de Chalendar (aka Kleag) 2017-08-02 12:50:50 UTC
Corrected in commit 384cb41a39afc2c914ff1048c5809620e2cb0fff.