Nux

Code review comment for lp://qastaging/~brandontschaefer/nux/xim-tests

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Well we want to avoid using the new C++ standard for now in Nux. Pointers aren't that bad ;).

The reason I didn't do a NULL check is the m_xim_controller gets initialized when the OpenGL window is created.

In GLWindowManager.cpp

112 GraphicsDisplay *glwindow = new GraphicsDisplay();
113 glwindow->CreateOpenGLWindow(WindowTitle, WindowWidth, WindowHeight, Style, GLWindow, FullscreenFlag, create_rendering_data);

or this function:

128 GraphicsDisplay *glwindow = new GraphicsDisplay();
129 glwindow->CreateFromOpenGLWindow(WindowHandle, WindowDCHandle, OpenGLRenderingContext);

Right after the GrapichsDisplay is created the window is made which allocates the controller.

For sanity reason I can check for NULL...but it doesn't seem necessary, because if the m_xim_controller is NULL then so is the m_X11Display and m_X11Window which I don't see those checked for NULL else where in there...let me know what you think.

And yes...it is no longer 2010 haha :)

« Back to merge proposal