mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
analysis: None used in pointer context
While this is totally fine (None is 0L and, in the pointer context, will be converted in the right internal NULL representation, which could be a value with some bits to 1), I believe it's clearer to use NULL instead of None when we talk about pointers.
This commit is contained in:
parent
52a78a7220
commit
ec59af290c
@ -159,7 +159,7 @@ clutter_backend_glx_dispose (GObject *gobject)
|
||||
{
|
||||
glXMakeContextCurrent (backend_x11->xdpy, None, None, NULL);
|
||||
glXDestroyContext (backend_x11->xdpy, backend_glx->gl_context);
|
||||
backend_glx->gl_context = None;
|
||||
backend_glx->gl_context = NULL;
|
||||
}
|
||||
|
||||
if (backend_glx->dummy_glxwin)
|
||||
@ -222,7 +222,7 @@ clutter_backend_glx_get_features (ClutterBackend *backend)
|
||||
flags |= CLUTTER_FEATURE_STAGE_MULTIPLE;
|
||||
|
||||
/* this will make sure that the GL context exists */
|
||||
g_assert (backend_glx->gl_context != None);
|
||||
g_assert (backend_glx->gl_context != NULL);
|
||||
g_assert (glXGetCurrentDrawable () != None);
|
||||
|
||||
CLUTTER_NOTE (BACKEND,
|
||||
@ -394,7 +394,7 @@ _clutter_backend_glx_get_fbconfig (ClutterBackendGLX *backend_glx,
|
||||
None
|
||||
};
|
||||
|
||||
if (backend_x11->xdpy == None || backend_x11->xscreen == None)
|
||||
if (backend_x11->xdpy == NULL || backend_x11->xscreen == NULL)
|
||||
return FALSE;
|
||||
|
||||
/* If we don't already have a cached config then try to get one */
|
||||
@ -420,7 +420,7 @@ _clutter_backend_glx_get_fbconfig (ClutterBackendGLX *backend_glx,
|
||||
|
||||
vinfo = glXGetVisualFromFBConfig (backend_x11->xdpy,
|
||||
configs[i]);
|
||||
if (vinfo == None)
|
||||
if (vinfo == NULL)
|
||||
continue;
|
||||
|
||||
if (vinfo->depth == 32 &&
|
||||
@ -492,7 +492,7 @@ clutter_backend_glx_create_context (ClutterBackend *backend,
|
||||
int minor;
|
||||
GLXDrawable dummy_drawable;
|
||||
|
||||
if (backend_glx->gl_context != None)
|
||||
if (backend_glx->gl_context != NULL)
|
||||
return TRUE;
|
||||
|
||||
xdisplay = clutter_x11_get_default_display ();
|
||||
@ -513,7 +513,7 @@ clutter_backend_glx_create_context (ClutterBackend *backend,
|
||||
GLX_RGBA_TYPE,
|
||||
NULL,
|
||||
True);
|
||||
if (backend_glx->gl_context == None)
|
||||
if (backend_glx->gl_context == NULL)
|
||||
{
|
||||
g_set_error (error, CLUTTER_INIT_ERROR,
|
||||
CLUTTER_INIT_ERROR_BACKEND,
|
||||
@ -540,7 +540,7 @@ clutter_backend_glx_create_context (ClutterBackend *backend,
|
||||
* now this is the best solution available.
|
||||
*/
|
||||
xvisinfo = glXGetVisualFromFBConfig (xdisplay, config);
|
||||
if (xvisinfo == None)
|
||||
if (xvisinfo == NULL)
|
||||
{
|
||||
g_set_error (error, CLUTTER_INIT_ERROR,
|
||||
CLUTTER_INIT_ERROR_BACKEND,
|
||||
@ -649,7 +649,7 @@ clutter_backend_glx_ensure_context (ClutterBackend *backend,
|
||||
(unsigned int) drawable);
|
||||
|
||||
/* no GL context to set */
|
||||
if (backend_glx->gl_context == None)
|
||||
if (backend_glx->gl_context == NULL)
|
||||
return;
|
||||
|
||||
clutter_x11_trap_x_errors ();
|
||||
|
@ -142,7 +142,7 @@ clutter_backend_x11_post_parse (ClutterBackend *backend,
|
||||
CLUTTER_NOTE (BACKEND, "XOpenDisplay on '%s'",
|
||||
clutter_display_name);
|
||||
backend_x11->xdpy = XOpenDisplay (clutter_display_name);
|
||||
if (backend_x11->xdpy == None)
|
||||
if (backend_x11->xdpy == NULL)
|
||||
{
|
||||
g_set_error (error, CLUTTER_INIT_ERROR,
|
||||
CLUTTER_INIT_ERROR_BACKEND,
|
||||
|
@ -105,7 +105,7 @@ create_pixmap (guint *width, guint *height, guint *depth)
|
||||
|
||||
data = g_malloc (w * h * 4);
|
||||
image = XCreateImage (dpy,
|
||||
None,
|
||||
NULL,
|
||||
32,
|
||||
ZPixmap,
|
||||
0,
|
||||
|
Loading…
Reference in New Issue
Block a user