[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/as_value.h
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] gnash ChangeLog server/as_value.h |
Date: |
Wed, 28 Mar 2007 08:46:44 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Bastiaan Jacques <bjacques> 07/03/28 08:46:43
Modified files:
. : ChangeLog
server : as_value.h
Log message:
Add as_value::to_number<type>(), which will
cast the result of to_number() to the requested number type.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2695&r2=1.2696
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_value.h?cvsroot=gnash&r1=1.38&r2=1.39
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2695
retrieving revision 1.2696
diff -u -b -r1.2695 -r1.2696
--- ChangeLog 28 Mar 2007 08:40:44 -0000 1.2695
+++ ChangeLog 28 Mar 2007 08:46:43 -0000 1.2696
@@ -1,3 +1,8 @@
+2007-03-28 Bastiaan Jacques <address@hidden>
+
+ * server/as_value.h: Add as_value::to_number<type>(), which will
+ cast the result of to_number() to the requested number type.
+
2007-03-28 Sandro Santilli <address@hidden>
* server/sprite_instance.{cpp,h}: add setVariables()
Index: server/as_value.h
===================================================================
RCS file: /sources/gnash/gnash/server/as_value.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- server/as_value.h 22 Mar 2007 08:45:51 -0000 1.38
+++ server/as_value.h 28 Mar 2007 08:46:43 -0000 1.39
@@ -14,7 +14,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-/* $Id: as_value.h,v 1.38 2007/03/22 08:45:51 strk Exp $ */
+/* $Id: as_value.h,v 1.39 2007/03/28 08:46:43 bjacques Exp $ */
#ifndef GNASH_AS_VALUE_H
#define GNASH_AS_VALUE_H
@@ -371,6 +371,16 @@
///
double to_number(as_environment* env=NULL) const;
+ /// Shorthand: casts the result of to_number() to the requested number
+ /// type.
+ //
+ /// Parameter identical to that of to_number().
+ template <typename T>
+ T to_number (as_environment* env=NULL) const
+ {
+ return static_cast<T>(to_number(env));
+ }
+
/// Conversion to boolean.
//
/// Will call version-dependent functions