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); } };