From e5b763b07538893520c3e9ff209571beb6165498 Mon Sep 17 00:00:00 2001 From: Ignacio Date: Mon, 23 Mar 2020 09:54:09 -0700 Subject: [PATCH] Minor fixes. --- src/nvcore/DefsVcWin32.h | 4 +++- src/nvcore/FileSystem.cpp | 2 +- src/nvcore/Utils.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/nvcore/DefsVcWin32.h b/src/nvcore/DefsVcWin32.h index 632817f..74d9e84 100644 --- a/src/nvcore/DefsVcWin32.h +++ b/src/nvcore/DefsVcWin32.h @@ -29,7 +29,9 @@ # define strtoll _strtoi64 # define strtoull _strtoui64 #endif -#define chdir _chdir +#if _MSC_VER < 1900 +# define chdir _chdir +#endif #define getcwd _getcwd #if _MSC_VER < 1800 // Not sure what version introduced this. diff --git a/src/nvcore/FileSystem.cpp b/src/nvcore/FileSystem.cpp index 4336f5d..aa7a920 100644 --- a/src/nvcore/FileSystem.cpp +++ b/src/nvcore/FileSystem.cpp @@ -6,7 +6,7 @@ #define _CRT_NONSTDC_NO_WARNINGS // _chdir is defined deprecated, but that's a bug, chdir is deprecated, _chdir is *not*. //#include // PathFileExists #include // GetFileAttributes -#include // _mkdir +#include // _mkdir, _chdir #elif NV_OS_XBOX #include #elif NV_OS_ORBIS diff --git a/src/nvcore/Utils.h b/src/nvcore/Utils.h index 2eb692c..50400e0 100644 --- a/src/nvcore/Utils.h +++ b/src/nvcore/Utils.h @@ -232,7 +232,7 @@ namespace nv inline uint64 nextPowerOfTwo(uint64 x) { nvDebugCheck(x != 0); - uint p = 1; + uint64 p = 1; while (x > p) { p += p; }