summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/delegate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/util/delegate.h')
-rw-r--r--src/lib/util/delegate.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/lib/util/delegate.h b/src/lib/util/delegate.h
index 85a1628409c..ec10a5c268d 100644
--- a/src/lib/util/delegate.h
+++ b/src/lib/util/delegate.h
@@ -631,16 +631,16 @@ public:
typedef MEMBER_ABI generic_static_func generic_member_func;
// generic constructor
delegate_base()
- : m_function(NULL),
- m_object(NULL),
- m_name(NULL),
- m_latebinder(NULL),
- m_raw_function(NULL) { }
+ : m_function(nullptr),
+ m_object(nullptr),
+ m_name(nullptr),
+ m_latebinder(nullptr),
+ m_raw_function(nullptr) { }
// copy constructor
delegate_base(const delegate_base &src)
: m_function(src.m_function),
- m_object(NULL),
+ m_object(nullptr),
m_name(src.m_name),
m_latebinder(src.m_latebinder),
m_raw_function(src.m_raw_function),
@@ -652,7 +652,7 @@ public:
// copy constructor with late bind
delegate_base(const delegate_base &src, delegate_late_bind &object)
: m_function(src.m_function),
- m_object(NULL),
+ m_object(nullptr),
m_name(src.m_name),
m_latebinder(src.m_latebinder),
m_raw_function(src.m_raw_function),
@@ -664,12 +664,12 @@ public:
// construct from member function with object pointer
template<class _FunctionClass>
delegate_base(typename traits<_FunctionClass>::member_func_type funcptr, const char *name, _FunctionClass *object)
- : m_function(NULL),
- m_object(NULL),
+ : m_function(nullptr),
+ m_object(nullptr),
m_name(name),
m_latebinder(&late_bind_helper<_FunctionClass>),
- m_raw_function(NULL),
- m_raw_mfp(funcptr, object, (_ReturnType *)0, (generic_static_func)0)
+ m_raw_function(nullptr),
+ m_raw_mfp(funcptr, object, (_ReturnType *)nullptr, (generic_static_func)nullptr)
{
bind(reinterpret_cast<delegate_generic_class *>(object));
}
@@ -678,7 +678,7 @@ public:
template<class _FunctionClass>
delegate_base(typename traits<_FunctionClass>::static_func_type funcptr, const char *name, _FunctionClass *object)
: m_function(reinterpret_cast<generic_static_func>(funcptr)),
- m_object(NULL),
+ m_object(nullptr),
m_name(name),
m_latebinder(&late_bind_helper<_FunctionClass>),
m_raw_function(reinterpret_cast<generic_static_func>(funcptr))
@@ -690,7 +690,7 @@ public:
template<class _FunctionClass>
delegate_base(typename traits<_FunctionClass>::static_ref_func_type funcptr, const char *name, _FunctionClass *object)
: m_function(reinterpret_cast<generic_static_func>(funcptr)),
- m_object(NULL),
+ m_object(nullptr),
m_name(name),
m_latebinder(&late_bind_helper<_FunctionClass>),
m_raw_function(reinterpret_cast<generic_static_func>(funcptr))
@@ -704,7 +704,7 @@ public:
if (this != &src)
{
m_function = src.m_function;
- m_object = NULL;
+ m_object = nullptr;
m_name = src.m_name;
m_latebinder = src.m_latebinder;
m_raw_function = src.m_raw_function;
@@ -744,11 +744,11 @@ public:
_ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8, _P9Type p9, _P10Type p10, _P11Type p11, _P12Type p12) const { DELEGATE_CALL((m_object, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); }
// getters
- bool has_object() const { return (object() != NULL); }
+ bool has_object() const { return (object() != nullptr); }
const char *name() const { return m_name; }
// helpers
- bool isnull() const { return (m_raw_function == NULL && m_raw_mfp.isnull()); }
+ bool isnull() const { return (m_raw_function == nullptr && m_raw_mfp.isnull()); }
bool is_mfp() const { return !m_raw_mfp.isnull(); }
// late binding
@@ -766,7 +766,7 @@ protected:
static delegate_generic_class *late_bind_helper(delegate_late_bind &object)
{
_FunctionClass *result = dynamic_cast<_FunctionClass *>(&object);
- if (result == NULL) {
+ if (result == nullptr) {
throw binding_type_exception(typeid(_FunctionClass), typeid(object));
}
return reinterpret_cast<delegate_generic_class *>(result);
@@ -778,7 +778,7 @@ protected:
m_object = object;
// if we're wrapping a member function pointer, handle special stuff
- if (m_object != NULL && is_mfp())
+ if (m_object != nullptr && is_mfp())
m_raw_mfp.update_after_bind(m_function, m_object);
}