Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/unix/SkNativeGLContext_unix.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp
diff --git a/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp b/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp
index 3aab86d28d1aa5c692db8a033853d4ddb9ef222e..cba380b74da11c78e1036a2f375981e0b9cf3825 100644
--- a/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp
+++ b/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp
@@ -18,7 +18,7 @@ public:
fModule = LoadLibrary(moduleName);
}
~AutoLibraryUnload() {
- if (NULL != fModule) {
+ if (fModule) {
FreeLibrary(fModule);
}
}
@@ -32,14 +32,14 @@ class GLProcGetter {
public:
GLProcGetter() : fGLLib("opengl32.dll") {}
- bool isInitialized() const { return NULL != fGLLib.get(); }
+ bool isInitialized() const { return SkToBool(fGLLib.get()); }
GrGLFuncPtr getProc(const char name[]) const {
GrGLFuncPtr proc;
- if (NULL != (proc = (GrGLFuncPtr) GetProcAddress(fGLLib.get(), name))) {
+ if ((proc = (GrGLFuncPtr) GetProcAddress(fGLLib.get(), name))) {
return proc;
}
- if (NULL != (proc = (GrGLFuncPtr) wglGetProcAddress(name))) {
+ if ((proc = (GrGLFuncPtr) wglGetProcAddress(name))) {
return proc;
}
return NULL;
@@ -50,8 +50,8 @@ private:
};
static GrGLFuncPtr win_get_gl_proc(void* ctx, const char name[]) {
- SkASSERT(NULL != ctx);
- SkASSERT(NULL != wglGetCurrentContext());
+ SkASSERT(ctx);
+ SkASSERT(wglGetCurrentContext());
const GLProcGetter* getter = (const GLProcGetter*) ctx;
return getter->getProc(name);
}
« no previous file with comments | « src/gpu/gl/unix/SkNativeGLContext_unix.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698