[Kde-games-devel] KPat Progress and Regressions
Parker Coates
parker.coates at gmail.com
Tue Nov 17 18:50:37 CET 2009
On Mon, Nov 16, 2009 at 19:43, Aaron J. Seigo wrote:
> On November 16, 2009, Parker Coates wrote:
>> Does this produce different/better/worse code than "qBound<qreal>(
>> 0.0, m_highlightFadeAmount, 1.0 );" or "qBound<qreal>( 0,
>> m_highlightFadeAmount, 1 );"
>
> it's not better/worse code, i'm just in the happen of wrapping qreals because
> on ARM they are not the same as on x86 and it causes fun and odd compile
> errors when comparing qreals and non-cast literals. 0 is an exception, it
> seems to work no matter what :)
Sorry, I should have clarified that I understand why Qt uses qreals to
support different platforms. It's just the details that I'm fuzzy
about.
I was thinking that comparing a qreal to "1" should work on all
platforms, since integers are automatically "elevated" to floating
points when needed for math and comparisons, but I could be wrong.
I wonder if there's and easy way to check for these issues. I doubt
just forcing "qreal = float" locally would work as that would conflict
with the definition used in the libraries. Maybe an ARM dashboard
could be set up. Heck, Krazy might even be able to catch the simpler
cases. Now if only we had someone with the time to actually care about
this. :)
Parker
More information about the kde-games-devel
mailing list