Bug 344555

Summary: src/part/canvaselement.cpp:201: bad use of ? : operator * 2
Product: [Applications] kgraphviewer Reporter: dcb314
Component: generalAssignee: Gaël de Chalendar (aka Kleag) <kleagg>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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.