From 3f04a3fc3e4ae8197e27ceee4dae04a2fe80285a Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 7 Jun 2018 18:26:44 -0700 Subject: [PATCH] Minor code review feedback --- Src/PlatformHelpers.h | 2 +- XWBTool/xwbtool.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/PlatformHelpers.h b/Src/PlatformHelpers.h index d5edfe7..4f6dc9b 100644 --- a/Src/PlatformHelpers.h +++ b/Src/PlatformHelpers.h @@ -73,5 +73,5 @@ namespace DirectX typedef std::unique_ptr ScopedHandle; - inline HANDLE safe_handle(HANDLE h) { return (h == INVALID_HANDLE_VALUE) ? 0 : h; } + inline HANDLE safe_handle(HANDLE h) { return (h == INVALID_HANDLE_VALUE) ? nullptr : h; } } diff --git a/XWBTool/xwbtool.cpp b/XWBTool/xwbtool.cpp index 3886d50..ff01b84 100644 --- a/XWBTool/xwbtool.cpp +++ b/XWBTool/xwbtool.cpp @@ -99,7 +99,7 @@ namespace typedef std::unique_ptr ScopedHandle; - inline HANDLE safe_handle(HANDLE h) { return (h == INVALID_HANDLE_VALUE) ? 0 : h; } + inline HANDLE safe_handle(HANDLE h) { return (h == INVALID_HANDLE_VALUE) ? nullptr : h; } struct find_closer { void operator()(HANDLE h) { assert(h != INVALID_HANDLE_VALUE); if (h) FindClose(h); } };