From fe0f5dc43809d8e17846cec68dad30277f0a1af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 6 Apr 2013 00:03:29 +0200 Subject: [PATCH] Use `nullptr` instead of `0`. --- src/Platform/AbstractXApplication.cpp | 4 ++-- src/Platform/GlxContextHandler.cpp | 2 +- src/Platform/WindowlessGlxApplication.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Platform/AbstractXApplication.cpp b/src/Platform/AbstractXApplication.cpp index 153429d13..f7a00bd71 100644 --- a/src/Platform/AbstractXApplication.cpp +++ b/src/Platform/AbstractXApplication.cpp @@ -50,7 +50,7 @@ void AbstractXApplication::createContext(AbstractXApplication::Configuration* co viewportSize = configuration->size(); /* Get default X display */ - display = XOpenDisplay(0); + display = XOpenDisplay(nullptr); /* Get visual ID */ VisualID visualId = contextHandler->getVisualId(display); @@ -74,7 +74,7 @@ void AbstractXApplication::createContext(AbstractXApplication::Configuration* co attr.event_mask = 0; unsigned long mask = CWBackPixel|CWBorderPixel|CWColormap|CWEventMask; window = XCreateWindow(display, root, 20, 20, configuration->size().x(), configuration->size().y(), 0, visInfo->depth, InputOutput, visInfo->visual, mask, &attr); - XSetStandardProperties(display, window, configuration->title().c_str(), 0, None, 0, 0, 0); + XSetStandardProperties(display, window, configuration->title().c_str(), nullptr, None, nullptr, 0, nullptr); XFree(visInfo); /* Be notified about closing the window */ diff --git a/src/Platform/GlxContextHandler.cpp b/src/Platform/GlxContextHandler.cpp index f39cd2db4..9e7506424 100644 --- a/src/Platform/GlxContextHandler.cpp +++ b/src/Platform/GlxContextHandler.cpp @@ -84,7 +84,7 @@ void GlxContextHandler::createContext(Window nativeWindow) { /** @todo Use some extension wrangler for this, not GLEW, as it apparently needs context to create context, yo dawg wtf. */ PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC) glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB"); - context = glXCreateContextAttribsARB(display, configs[0], 0, True, attributes); + context = glXCreateContextAttribsARB(display, configs[0], nullptr, True, attributes); XFree(configs); if(!context) { Error() << "GlxContextHandler: cannot create context."; diff --git a/src/Platform/WindowlessGlxApplication.cpp b/src/Platform/WindowlessGlxApplication.cpp index 39f934f60..2d7c017b8 100644 --- a/src/Platform/WindowlessGlxApplication.cpp +++ b/src/Platform/WindowlessGlxApplication.cpp @@ -74,7 +74,7 @@ void WindowlessGlxApplication::createContext(Configuration* configuration) { /** @todo Use some extension wrangler for this, not GLEW, as it apparently needs context to create context, yo dawg wtf. */ PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC) glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB"); - context = glXCreateContextAttribsARB(display, configs[0], 0, True, contextAttributes); + context = glXCreateContextAttribsARB(display, configs[0], nullptr, True, contextAttributes); if(!context) { Error() << "WindowlessGlxApplication: cannot create context."; std::exit(1);