[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 11:43:17 +0200 |
On Wed, Sep 09, 2009 at 01:49:13PM -0600, Rob Savoye wrote:
> double argument2 = fn.arg(1).to_number();
> if (argument2 >= 0) {
> - ptr->set_silenceTimeout(argument2);
> + ptr->set_silenceTimeout(int(argument2));
as_value has a to_int() method too, which deals
with specifities when an int is really needed
(overflows and proper rounding).
There are tests in the testsuite which fail when
a to_int() is converted to an int(to_number()).
I can't remember out-of-the-box where those tests
are but if anyone finds them they could be used
to test those values in the specific context
of Microphone AS class.
--strk;
Free GIS & Flash consultant/developer () ASCII Ribbon Campaign
http://foo.keybit.net/~strk/services.html /\ Keep it simple!