[Top][All Lists]

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

Re: [Gnash-commit] /srv/bzr/gnash/trunk r11501: cast double to int to el

From: strk
Subject: Re: [Gnash-commit] /srv/bzr/gnash/trunk r11501: cast double to int to eliminate compiler warning.
Date: Thu, 10 Sep 2009 16:42:36 +0200

On Thu, Sep 10, 2009 at 08:03:00AM -0600, Rob Savoye wrote:
> On 09/10/09 03:43, strk wrote:
> >as_value has a to_int() method too, which deals
> >with specifities when an int is really needed
> >(overflows and proper rounding).
>   It wasn't an as_value that needed converting, it was a double. I just 
> got tired of the warning message.

I re-paste the snippet:

>              double argument2 = fn.arg(1).to_number();
>              if (argument2 >= 0) {
> -                ptr->set_silenceTimeout(argument2);
> +                ptr->set_silenceTimeout(int(argument2));

fn.arg(1) *is* an as_value.
argument2 is a double, but might need to be an int.

-- strk;

 Free GIS & Flash consultant/developer      ()  ASCII Ribbon Campaign  /\  Keep it simple! 

reply via email to

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