From ea52ebb26e6b3923c6ac9b7492e67cfcc9039d4b Mon Sep 17 00:00:00 2001 From: Alessandro Pignotti Date: Sun, 10 Jun 2012 19:35:49 +0200 Subject: [PATCH] Restore NullRef instead of std::nullptr_t std::nullptr is ambiguos since it's acceptable also as Ref constructor This reverts commit 95fc48d50e8ae28a43585d9aa4d275ec84e4a4cf. --- src/scripting/abc.cpp | 2 +- src/smartrefs.h | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/scripting/abc.cpp b/src/scripting/abc.cpp index 0bad425..8110666 100644 --- a/src/scripting/abc.cpp +++ b/src/scripting/abc.cpp @@ -170,7 +170,7 @@ void ScriptLimitsTag::execute(RootMovieClip* root) const void ABCVm::registerClasses() { - Global* builtin=Class::getInstanceS((ABCContext*)0, 0); + Global* builtin=Class::getInstanceS(nullptr, 0); //Register predefined types, ASObject are enough for not implemented classes builtin->registerBuiltin("Object","",Class::getRef()); builtin->registerBuiltin("Class","",Class_object::getRef()); diff --git a/src/smartrefs.h b/src/smartrefs.h index 5087b2f..09ce760 100644 --- a/src/smartrefs.h +++ b/src/smartrefs.h @@ -119,14 +119,7 @@ class Ref return Ref(a); } -//#if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ < 6) -/* Fallback for gcc < 4.6 not supporting nullptr */ -class NullRef_t {}; -extern NullRef_t NullRef; -/*#else -typedef std::nullptr_t NullRef_t; #define NullRef (nullptr) -#endif*/ template class NullableRef @@ -136,7 +129,7 @@ class NullableRef public: NullableRef(): m(NULL) {} explicit NullableRef(T* o):m(o){} - NullableRef(NullRef_t):m(NULL){} + NullableRef(std::nullptr_t):m(NULL){} NullableRef(const NullableRef& r):m(r.m) { if(m) -- 1.7.10