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

Unified Diff: core/src/fxge/win32/fx_win32_dwrite.cpp

Issue 1529553003: Merge to XFA: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years 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
Index: core/src/fxge/win32/fx_win32_dwrite.cpp
diff --git a/core/src/fxge/win32/fx_win32_dwrite.cpp b/core/src/fxge/win32/fx_win32_dwrite.cpp
index ab50f3cf38cab4811f2aec0723c69654640509ce..83924f23e7e1780169fdb686ef18f6acbe915663 100644
--- a/core/src/fxge/win32/fx_win32_dwrite.cpp
+++ b/core/src/fxge/win32/fx_win32_dwrite.cpp
@@ -18,14 +18,14 @@ typedef HRESULT(__stdcall* FuncType_DWriteCreateFactory)(
__out IUnknown**);
template <typename InterfaceType>
inline void SafeRelease(InterfaceType** currentObject) {
- if (*currentObject != NULL) {
+ if (*currentObject) {
(*currentObject)->Release();
*currentObject = NULL;
}
}
template <typename InterfaceType>
inline InterfaceType* SafeAcquire(InterfaceType* newObject) {
- if (newObject != NULL) {
+ if (newObject) {
newObject->AddRef();
}
return newObject;

Powered by Google App Engine
This is Rietveld 408576698