code cleanup: 0 --> NULL

This commit is contained in:
Campbell Barton
2013-03-08 06:32:00 +00:00
parent 1d5b7bc1f7
commit 6fd187e4df
16 changed files with 29 additions and 29 deletions

View 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.

View 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)
{
}

View 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();
}

View File

@@ -141,7 +141,7 @@ public:
virtual void
removeTypeEvents(
GHOST_TEventType type,
GHOST_IWindow *window = 0
GHOST_IWindow *window = NULL
);
protected:

View 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)

View File

@@ -46,10 +46,10 @@
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) {

View 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.

View 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 {

View 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),