From 49f085dddff10473b6ebf832a974288300224e60 Mon Sep 17 00:00:00 2001 From: bsalomon Date: Fri, 5 Sep 2014 13:34:00 -0700 Subject: "NULL !=" = NULL R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002 --- src/utils/win/SkDWriteFontFileStream.cpp | 2 +- src/utils/win/SkHRESULT.cpp | 2 +- src/utils/win/SkIStream.cpp | 6 +++--- src/utils/win/SkWGL_win.cpp | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/utils/win') 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(data) + static_cast(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); -- cgit v1.2.3