Enable CXX_GUARDEDALLOC support through SCons.
[blender.git] / source / gameengine / Expressions / VoidValue.h
index 4bde025478734df1ac7d32dec7b944c3f138ec0c..f30f8c1be7c564c73ca02e7c6c8567ad284de955 100644 (file)
@@ -16,7 +16,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
  * All rights reserved.
@@ -47,7 +47,7 @@ public:
 
        /// Value -> String or number
        virtual const STR_String &      GetText();                                                                                              // Get string description of void value (unimplemented)
-       virtual float           GetNumber()                                                                                             { return -1; }
+       virtual double          GetNumber()                                                                                             { return -1; }
 
        /// Value calculation
        virtual CValue*         Calc(VALUE_OPERATOR op, CValue *val);
@@ -59,6 +59,13 @@ public:
        /// Data members
        bool                            m_bDeleteOnDestruct;
        void*                           m_pAnything;
+       
+       
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CVoidValue"); }
+       void operator delete( void *mem ) { MEM_freeN(mem); }
+#endif
 };
 
 #endif // !defined _VOIDVALUE_H