From 7c8e7c6b6e16d4a26259a676db32d8776b99817e Mon Sep 17 00:00:00 2001 From: Henry Wilson Date: Wed, 10 Apr 2019 22:07:06 +0100 Subject: Codechange: Use null pointer literal instead of the NULL macro --- src/video/allegro_v.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/video/allegro_v.cpp') diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp index c21f88d67..47dd92e1e 100644 --- a/src/video/allegro_v.cpp +++ b/src/video/allegro_v.cpp @@ -140,7 +140,7 @@ static void GetVideoModes() set_gfx_mode(_fullscreen ? GFX_AUTODETECT_FULLSCREEN : GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0); GFX_MODE_LIST *mode_list = get_gfx_mode_list(gfx_driver->id); - if (mode_list == NULL) { + if (mode_list == nullptr) { memcpy(_resolutions, default_resolutions, sizeof(default_resolutions)); _num_resolutions = lengthof(default_resolutions); return; @@ -243,7 +243,7 @@ static bool CreateMainSurface(uint w, uint h) bool VideoDriver_Allegro::ClaimMousePointer() { select_mouse_cursor(MOUSE_CURSOR_NONE); - show_mouse(NULL); + show_mouse(nullptr); disable_hardware_cursor(); return true; } @@ -424,7 +424,7 @@ int _allegro_instance_count = 0; const char *VideoDriver_Allegro::Start(const char * const *parm) { - if (_allegro_instance_count == 0 && install_allegro(SYSTEM_AUTODETECT, &errno, NULL)) { + if (_allegro_instance_count == 0 && install_allegro(SYSTEM_AUTODETECT, &errno, nullptr)) { DEBUG(driver, 0, "allegro: install_allegro failed '%s'", allegro_error); return "Failed to set up Allegro"; } @@ -437,8 +437,8 @@ const char *VideoDriver_Allegro::Start(const char * const *parm) #if defined _DEBUG /* Allegro replaces SEGV/ABRT signals meaning that the debugger will never * be triggered, so rereplace the signals and make the debugger useful. */ - signal(SIGABRT, NULL); - signal(SIGSEGV, NULL); + signal(SIGABRT, nullptr); + signal(SIGSEGV, nullptr); #endif GetVideoModes(); @@ -448,7 +448,7 @@ const char *VideoDriver_Allegro::Start(const char * const *parm) MarkWholeScreenDirty(); set_close_button_callback(HandleExitGameRequest); - return NULL; + return nullptr; } void VideoDriver_Allegro::Stop() @@ -463,7 +463,7 @@ static uint32 GetTime() { struct timeval tim; - gettimeofday(&tim, NULL); + gettimeofday(&tim, nullptr); return tim.tv_usec / 1000 + tim.tv_sec * 1000; } #else -- cgit v1.2.3-54-g00ecf