aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/win
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-09-05 13:34:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-05 13:34:00 -0700
commit49f085dddff10473b6ebf832a974288300224e60 (patch)
tree308a3cac5e1fb053c9e27e7d07213d72eaa05409 /src/utils/win
parent7260d7292bde966f038b8e166f3fe41ddd8f2099 (diff)
"NULL !=" = NULL
R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
Diffstat (limited to 'src/utils/win')
-rw-r--r--src/utils/win/SkDWriteFontFileStream.cpp2
-rw-r--r--src/utils/win/SkHRESULT.cpp2
-rw-r--r--src/utils/win/SkIStream.cpp6
-rw-r--r--src/utils/win/SkWGL_win.cpp6
4 files changed, 8 insertions, 8 deletions
diff --git a/src/utils/win/SkDWriteFontFileStream.cpp b/src/utils/win/SkDWriteFontFileStream.cpp
index c7dc3b2128..0f0c628f9a 100644
--- a/src/utils/win/SkDWriteFontFileStream.cpp
+++ b/src/utils/win/SkDWriteFontFileStream.cpp
@@ -188,7 +188,7 @@ HRESULT STDMETHODCALLTYPE SkDWriteFontFileStreamWrapper::ReadFileFragment(
}
const void* data = fStream->getMemoryBase();
- if (NULL != data) {
+ if (data) {
*fragmentStart = static_cast<BYTE const*>(data) + static_cast<size_t>(fileOffset);
*fragmentContext = NULL;
diff --git a/src/utils/win/SkHRESULT.cpp b/src/utils/win/SkHRESULT.cpp
index 495f074eb2..0aea4a622e 100644
--- a/src/utils/win/SkHRESULT.cpp
+++ b/src/utils/win/SkHRESULT.cpp
@@ -10,7 +10,7 @@
#include "SkHRESULT.h"
void SkTraceHR(const char* file, unsigned long line, HRESULT hr, const char* msg) {
- if (NULL != msg) {
+ if (msg) {
SkDebugf("%s\n", msg);
}
SkDebugf("%s(%lu) : error 0x%x: ", file, line, hr);
diff --git a/src/utils/win/SkIStream.cpp b/src/utils/win/SkIStream.cpp
index 74d814ccb1..6274e717a2 100644
--- a/src/utils/win/SkIStream.cpp
+++ b/src/utils/win/SkIStream.cpp
@@ -113,7 +113,7 @@ SkIStream::SkIStream(SkStream* stream, bool unrefOnRelease)
}
SkIStream::~SkIStream() {
- if (NULL != this->fSkStream && fUnrefOnRelease) {
+ if (this->fSkStream && fUnrefOnRelease) {
this->fSkStream->unref();
}
}
@@ -196,7 +196,7 @@ HRESULT STDMETHODCALLTYPE SkIStream::Seek(LARGE_INTEGER liDistanceToMove
break;
}
- if (NULL != lpNewFilePointer) {
+ if (lpNewFilePointer) {
lpNewFilePointer->QuadPart = this->fLocation.QuadPart;
}
return hr;
@@ -228,7 +228,7 @@ SkWIStream::SkWIStream(SkWStream* stream)
{ }
SkWIStream::~SkWIStream() {
- if (NULL != this->fSkWStream) {
+ if (this->fSkWStream) {
this->fSkWStream->flush();
}
}
diff --git a/src/utils/win/SkWGL_win.cpp b/src/utils/win/SkWGL_win.cpp
index 9c0c2d4bbb..5c461385a4 100644
--- a/src/utils/win/SkWGL_win.cpp
+++ b/src/utils/win/SkWGL_win.cpp
@@ -367,7 +367,7 @@ static HGLRC create_gl_context(HDC dc, SkWGLExtensions extensions, SkWGLContextR
coreProfileAttribs[1] = kCoreGLVersions[2 * v];
coreProfileAttribs[3] = kCoreGLVersions[2 * v + 1];
glrc = extensions.createContextAttribs(dc, NULL, coreProfileAttribs);
- if (NULL != glrc) {
+ if (glrc) {
break;
}
}
@@ -429,9 +429,9 @@ SkWGLPbufferContext* SkWGLPbufferContext::Create(HDC parentDC, int msaaSampleCou
HPBUFFER pbuf = extensions.createPbuffer(parentDC, pixelFormatsToTry[f], 1, 1, NULL);
if (0 != pbuf) {
HDC dc = extensions.getPbufferDC(pbuf);
- if (NULL != dc) {
+ if (dc) {
HGLRC glrc = create_gl_context(dc, extensions, contextType);
- if (NULL != glrc) {
+ if (glrc) {
return SkNEW_ARGS(SkWGLPbufferContext, (pbuf, dc, glrc));
}
extensions.releasePbufferDC(pbuf, dc);