Re: [Kicad-developers] [PATCH 2/2] Remove questionable useless casts

2019-09-06 Thread Simon Richter
Hi, On Fri, Sep 06, 2019 at 10:09:07PM -0400, Reece R. Pollack wrote: > >-const float posYfactor = (float)(windowsPos.y + y * > >4.0f) / (float)m_windowSize.y; > >+const float posYfactor = windowsPos.y + y * 4.0f / > >(float)m_windowSize.y; > These are

Re: [Kicad-developers] [PATCH 2/2] Remove questionable useless casts

2019-09-06 Thread Reece R. Pollack
On 9/6/19 6:36 PM, Simon Richter wrote: -const float posYfactor = (float)(windowsPos.y + y * 4.0f) / (float)m_windowSize.y; +const float posYfactor = windowsPos.y + y * 4.0f / (float)m_windowSize.y; These are mathematically different expressions. You

[Kicad-developers] [PATCH 2/2] Remove questionable useless casts

2019-09-06 Thread Simon Richter
These are also reported by gcc -Wuseless-casts as having the same source and destination type, so the new code is equivalent to the old, but it is less immediately obvious that this interpretation was originally intended. --- .../3d_render_raytracing/c3d_render_raytracing.cpp| 2 +-