code cleanup: 0 --> NULL
authorCampbell Barton <ideasman42@gmail.com>
Fri, 8 Mar 2013 06:32:00 +0000 (06:32 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 8 Mar 2013 06:32:00 +0000 (06:32 +0000)
16 files changed:
intern/audaspace/FX/AUD_CallbackIIRFilterReader.h
intern/ghost/GHOST_ISystem.h
intern/ghost/intern/GHOST_Event.h
intern/ghost/intern/GHOST_EventManager.cpp
intern/ghost/intern/GHOST_EventManager.h
intern/ghost/intern/GHOST_Path-api.cpp
intern/ghost/intern/GHOST_System.cpp
intern/ghost/intern/GHOST_System.h
intern/ghost/intern/GHOST_TimerManager.cpp
intern/ghost/intern/GHOST_TimerTask.h
intern/memutil/MEM_Allocator.h
intern/memutil/MEM_CacheLimiter.h
intern/memutil/intern/MEM_CacheLimiterC-Api.cpp
intern/string/intern/STR_String.cpp
source/blender/render/intern/raytrace/rayobject.cpp
source/blender/render/intern/raytrace/rayobject_rtbuild.cpp

index d9df65f03eb671f8be09f5ecb6bb9b34285d4eb6..66f82ba1a01b33c0e3455a5704d2dc20692c3ef6 100644 (file)
@@ -77,7 +77,7 @@ public:
        AUD_CallbackIIRFilterReader(boost::shared_ptr<AUD_IReader> reader, int in, int out,
                                                                doFilterIIR doFilter,
                                                                endFilterIIR endFilter = 0,
-                                                               void* data = 0);
+                                                               void* data = NULL);
 
        virtual ~AUD_CallbackIIRFilterReader();
 
index 37e82c29f8021dd1e6e9ced85ce32e2721d3679b..137926b033c725940dd38cdbc3329c9b3dddaa1b 100644 (file)
@@ -201,7 +201,7 @@ public:
        virtual GHOST_ITimerTask *installTimer(GHOST_TUns64 delay,
                                               GHOST_TUns64 interval,
                                               GHOST_TimerProcPtr timerProc,
-                                              GHOST_TUserDataPtr userData = 0) = 0;
+                                              GHOST_TUserDataPtr userData = NULL) = 0;
 
        /**
         * Removes a timer.
index c9a51f2955907181f69daf038926ae3a70e71405..ea4d603be83d7fdd733f1c49fa4c9aa0b3586743 100644 (file)
@@ -51,7 +51,7 @@ public:
         * \param window The generating window (or NULL if system event).
         */
        GHOST_Event(GHOST_TUns64 msec, GHOST_TEventType type, GHOST_IWindow *window)
-               : m_type(type), m_time(msec), m_window(window), m_data(0)
+               : m_type(type), m_time(msec), m_window(window), m_data(NULL)
        {
        }
 
index 014eef85aa822fe68497e130737b064637877b21..2fddfe22c85ad52360e5f2653ad897eb7c322db8 100644 (file)
@@ -81,7 +81,7 @@ GHOST_TUns32 GHOST_EventManager::getNumEvents(GHOST_TEventType type)
 
 GHOST_IEvent *GHOST_EventManager::peekEvent()
 {
-       GHOST_IEvent *event = 0;
+       GHOST_IEvent *event = NULL;
        if (m_events.empty() == false) {
                event = m_events.back();
        }
index fea8214c7f250d5f8aaa3b424f40599991f6105e..8e513b4ee76d3beb82143e0ba021afbeb30f6bc7 100644 (file)
@@ -141,7 +141,7 @@ public:
        virtual void
        removeTypeEvents(
            GHOST_TEventType type,
-           GHOST_IWindow *window = 0
+           GHOST_IWindow *window = NULL
            );
 
 protected:
index 2bc58517e75c3575fd9d728ae7e67d40c9027185..b61d321216f3c6b1b361857b7a3c0ea0576a4724 100644 (file)
@@ -48,19 +48,19 @@ GHOST_TSuccess GHOST_DisposeSystemPaths(void)
 const GHOST_TUns8 *GHOST_getSystemDir(int version, const char *versionstr)
 {
        GHOST_ISystemPaths *systemPaths = GHOST_ISystemPaths::get();
-       return systemPaths ? systemPaths->getSystemDir(version, versionstr) : 0;
+       return systemPaths ? systemPaths->getSystemDir(version, versionstr) : NULL;
 }
 
 const GHOST_TUns8 *GHOST_getUserDir(int version, const char *versionstr)
 {
        GHOST_ISystemPaths *systemPaths = GHOST_ISystemPaths::get();
-       return systemPaths ? systemPaths->getUserDir(version, versionstr) : 0; /* shouldn't be NULL */
+       return systemPaths ? systemPaths->getUserDir(version, versionstr) : NULL; /* shouldn't be NULL */
 }
 
 const GHOST_TUns8 *GHOST_getBinaryDir()
 {
        GHOST_ISystemPaths *systemPaths = GHOST_ISystemPaths::get();
-       return systemPaths ? systemPaths->getBinaryDir() : 0;  /* shouldn't be NULL */
+       return systemPaths ? systemPaths->getBinaryDir() : NULL;  /* shouldn't be NULL */
 }
 
 void GHOST_addToSystemRecentFiles(const char *filename)
index 5405fe7efe8769f4605d7f345b7deb0e91675e5f..023c5958c4f584d32796c748c7006be2488cda8b 100644 (file)
 
 GHOST_System::GHOST_System()
        : m_nativePixel(false),
-       m_displayManager(0),
-       m_timerManager(0),
-       m_windowManager(0),
-       m_eventManager(0)
+       m_displayManager(NULL),
+       m_timerManager(NULL),
+       m_windowManager(NULL),
+       m_eventManager(NULL)
 #ifdef WITH_INPUT_NDOF
        , m_ndofManager(0)
 #endif
@@ -324,19 +324,19 @@ GHOST_TSuccess GHOST_System::exit()
        }
        if (m_displayManager) {
                delete m_displayManager;
-               m_displayManager = 0;
+               m_displayManager = NULL;
        }
        if (m_windowManager) {
                delete m_windowManager;
-               m_windowManager = 0;
+               m_windowManager = NULL;
        }
        if (m_timerManager) {
                delete m_timerManager;
-               m_timerManager = 0;
+               m_timerManager = NULL;
        }
        if (m_eventManager) {
                delete m_eventManager;
-               m_eventManager = 0;
+               m_eventManager = NULL;
        }
 #ifdef WITH_INPUT_NDOF
        if (m_ndofManager) {
index 0d18dfe532ff05ef62c2594008a3fd8d1080279b..57aa0a31c94405c1b2f7e921ccc045c2731246fc 100644 (file)
@@ -100,7 +100,7 @@ public:
        virtual GHOST_ITimerTask *installTimer(GHOST_TUns64 delay,
                                               GHOST_TUns64 interval,
                                               GHOST_TimerProcPtr timerProc,
-                                              GHOST_TUserDataPtr userData = 0);
+                                              GHOST_TUserDataPtr userData = NULL);
 
        /**
         * Removes a timer.
index 601359984dea98c4b00daf735aacb5826552f82b..8cba0608f2bf3522721d0fc72599022dcec11366 100644 (file)
@@ -90,7 +90,7 @@ GHOST_TSuccess GHOST_TimerManager::removeTimer(GHOST_TimerTask *timer)
                // Remove the timer task
                m_timers.erase(iter);
                delete timer;
-               timer = 0;
+               timer = NULL;
                success = GHOST_kSuccess;
        }
        else {
index 0731bc066af0d5f14be8b04410f1b570749a9bed..e8f5ecd9fbb6fa60aa86e2c7166c1801318640c2 100644 (file)
@@ -54,7 +54,7 @@ public:
        GHOST_TimerTask(GHOST_TUns64 start,
                        GHOST_TUns64 interval,
                        GHOST_TimerProcPtr timerProc,
-                       GHOST_TUserDataPtr userData = 0)
+                       GHOST_TUserDataPtr userData = NULL)
                : m_start(start),
                m_interval(interval),
                m_next(start),
index 0020094ebbb9bc3958689580651c6a11ed787afc..b4c0559b51174d5aa520cd3af6883147779056ba 100644 (file)
@@ -63,7 +63,7 @@ struct MEM_Allocator
        // NB: __n is permitted to be 0.  The C++ standard says nothing
        // about what the return value is when __n == 0.
        _Tp* allocate(size_type __n, const void* = 0) {
-               _Tp* __ret = 0;
+               _Tp* __ret = NULL;
                if (__n)
                        __ret = static_cast<_Tp*>(
                                MEM_mallocN(__n * sizeof(_Tp),
index daf66dc05b1f6304ffea383196363c01a227385b..4e776929731775018b5dd6d0890893c7826016af 100644 (file)
@@ -108,7 +108,7 @@ public:
        bool destroy_if_possible() {
                if (can_destroy()) {
                        delete data;
-                       data = 0;
+                       data = NULL;
                        unmanage();
                        return true;
                }
index 7a19543b2db3e9d0f44c94f7bc018ea330a70562..f946c9707111033577fb363c163568d23e527c26 100644 (file)
@@ -128,7 +128,7 @@ MEM_CacheLimiterCClass::~MEM_CacheLimiterCClass()
 {
        // should not happen, but don't leak memory in this case...
        for (list_t::iterator it = cclass_list.begin(); it != cclass_list.end(); it++) {
-               (*it)->set_data(0);
+               (*it)->set_data(NULL);
 
                delete *it;
        }
index 283b44380ee2c79f4505c79bd62a84cd06884a9a..4ea451311e4b4f7bd88aa5b1e4e7e85573f93073 100644 (file)
@@ -106,7 +106,7 @@ STR_String::STR_String(const char *str)
                this->m_data[this->m_len] = 0;
        }
        else {
-               this->m_data = 0;
+               this->m_data = NULL;
                this->m_len = 0;
                this->m_max = 8;
        }
index b31aff82777342673d7f3a4bcb63ae86f1768634..9e639501fddf95687c50d49b0ef4b806d4987f22 100644 (file)
@@ -87,7 +87,7 @@ MALWAYS_INLINE void rayface_from_vlak(RayFace *rayface, ObjectInstanceRen *obi,
 
 RayObject *RE_rayface_from_vlak(RayFace *rayface, ObjectInstanceRen *obi, VlakRen *vlr)
 {
-       return rayface_from_coords(rayface, obi, vlr, vlr->v1->co, vlr->v2->co, vlr->v3->co, vlr->v4 ? vlr->v4->co : 0);
+       return rayface_from_coords(rayface, obi, vlr, vlr->v1->co, vlr->v2->co, vlr->v3->co, vlr->v4 ? vlr->v4->co : NULL);
 }
 
 RayObject *RE_rayface_from_coords(RayFace *rayface, void *ob, void *face, float *v1, float *v2, float *v3, float *v4)
index 4195b1038112dbbf7179f0076e52a94a1ad28cc4..1d67a8c4f44cf686ad9022d4be6c11b6f4a4093e 100644 (file)
@@ -50,15 +50,15 @@ static bool selected_node(RTBuilder::Object *node)
 static void rtbuild_init(RTBuilder *b)
 {
        b->split_axis = -1;
-       b->primitives.begin   = 0;
-       b->primitives.end     = 0;
+       b->primitives.begin   = NULL;
+       b->primitives.end     = NULL;
        b->primitives.maxsize = 0;
        
        for (int i = 0; i < RTBUILD_MAX_CHILDS; i++)
                b->child_offset[i] = 0;
 
        for (int i = 0; i < 3; i++)
-               b->sorted_begin[i] = b->sorted_end[i] = 0;
+               b->sorted_begin[i] = b->sorted_end[i] = NULL;
                
        INIT_MINMAX(b->bb, b->bb + 3);
 }
@@ -178,8 +178,8 @@ RTBuilder *rtbuild_get_child(RTBuilder *b, int child, RTBuilder *tmp)
                        tmp->sorted_end[i] = b->sorted_begin[i] +  b->child_offset[child + 1];
                }
                else {
-                       tmp->sorted_begin[i] = 0;
-                       tmp->sorted_end[i] = 0;
+                       tmp->sorted_begin[i] = NULL;
+                       tmp->sorted_end[i] = NULL;
                }
        
        return tmp;