X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=inline;f=include%2Fbase.h;h=0a4456f3a7fd398c2aea015b38dc88c76a5d5ded;hb=529d26bdafb033a3f90691d21f609067261bb953;hp=230ed1db4f81f02a35816c849aa07ac19015bd3d;hpb=c4a53990f0767b38f0c2454c9e10e4f85ad08093;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/base.h b/include/base.h index 230ed1db4..0a4456f3a 100644 --- a/include/base.h +++ b/include/base.h @@ -26,6 +26,7 @@ #include #include #include +#include /** Dummy class to help enforce culls being parent-called up to classbase */ class CullResult @@ -121,7 +122,7 @@ class CoreExport usecountbase }; template -class CoreExport reference +class reference { T* value; public: @@ -157,7 +158,7 @@ class CoreExport reference return *this; } - inline operator bool() const { return value; } + inline operator bool() const { return (value != NULL); } inline operator T*() const { return value; } inline T* operator->() const { return value; } inline T& operator*() const { return *value; } @@ -165,7 +166,7 @@ class CoreExport reference inline bool operator>(const reference& other) const { return value > other.value; } static inline void* operator new(size_t, void* m) { return m; } private: -#ifndef WIN32 +#ifndef _WIN32 static void* operator new(size_t); static void operator delete(void*); #endif