[Top][All Lists]

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

Re: [Gnash-commit] /srv/bzr/gnash/trunk r10284: libcore/as_value.{cpp, h

From: Bastiaan Jacques
Subject: Re: [Gnash-commit] /srv/bzr/gnash/trunk r10284: libcore/as_value.{cpp, h}: Increase type safety by using templates to
Date: Mon, 17 Nov 2008 06:17:14 -0800 (PST)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Mon, 17 Nov 2008, strk wrote:

On Sat, Nov 15, 2008 at 08:49:41PM +0100, Bastiaan Jacques wrote:
revno: 10284
committer: Bastiaan Jacques <address@hidden>
branch nick: trunk
timestamp: Sat 2008-11-15 20:49:41 +0100
  libcore/as_value.{cpp,h}: Increase type safety by using templates to
  prevent implicit conversions to bool. This allows us to declare a
  single numeric constructor. As a side-effect, the compiler will
  refuse to compile as_value(NULL) or as_value(0) until you resolve
  the ambiguity.

Just a note: avm2 has an "int" value IIRC.
error: call of overloaded 'as_value(int)' is ambiguous
^^ so this might need to change.

No, as_value(int) will implicitly convert to double. Only _literal_ 0
will not compile.


reply via email to

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