Browse Source

Use `nullptr` instead of `0`.

pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
fe0f5dc438
  1. 4
      src/Platform/AbstractXApplication.cpp
  2. 2
      src/Platform/GlxContextHandler.cpp
  3. 2
      src/Platform/WindowlessGlxApplication.cpp

4
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 */

2
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.";

2
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);

Loading…
Cancel
Save