gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] Re: JPEGs offset


From: strk
Subject: Re: [Gnash-dev] Re: JPEGs offset
Date: Wed, 29 Oct 2008 10:56:43 +0100

On Thu, Oct 16, 2008 at 08:52:06PM +0200, Benjamin Wolsey wrote:
> 
> > This solution seems acceptable to me, but I'm curious if anyone can
> > shed some light on the floating point conversion:
> > 
> > return static_cast<boost::int32_t>(static_cast<boost::uint32_t>(a * 20));
> > 
> > used in PIXELS_TO_TWIPS.  Is there a compiler flag or something that
> > allows negative floating point numbers to be converted to a non-zero
> > unsigned int that I'm missing for my cross compile?
> > 
> 
> It's undefined behaviour, so there's nothing you can do to be sure on
> any platform. I think we should be using the safe conversion all the
> time.

Is this what zou was talking about too ?

+1 for going the safe way always (never mind if it's slower)

--strk;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]