X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fbase.h;h=19222a6f5d2ac4ac592ae84797c7044c31d7a1a1;hb=584cbe80152ed3bb8cdbedc41c43d63cd10ca799;hp=230ed1db4f81f02a35816c849aa07ac19015bd3d;hpb=35ce47718b6021115c9b12e7e63a7daf8bb4a900;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/base.h b/include/base.h index 230ed1db4..19222a6f5 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 @@ -200,7 +201,7 @@ class CoreExport CoreException : public std::exception * Actually no, it does nothing. Never mind. * @throws Nothing! */ - virtual ~CoreException() throw() {}; + virtual ~CoreException() throw() {} /** Returns the reason for the exception. * The module should probably put something informative here as the user will see this upon failure. */