summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FileUtil.cpp
diff options
context:
space:
mode:
authorshuffle2 <godisgovernment@gmail.com>2017-06-07 20:33:54 -0700
committerGitHub <noreply@github.com>2017-06-07 20:33:54 -0700
commitb11d722eeda67bc498f7bf727649fb4ae4e5f997 (patch)
tree597b9596564442ac1c125f5f7332ffc6ec97ce03 /Source/Core/Common/FileUtil.cpp
parente6aa118f2111351c7fb38a611f3523793927addb (diff)
parentfd166032abec349b9fae7240830133bf7e0c77b5 (diff)
Merge pull request #5572 from shuffle2/msvc-w4
msvc: use /W4 (and fixes to make it work)
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
-rw-r--r--Source/Core/Common/FileUtil.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp
index ebab9e9c48..203ddbac4b 100644
--- a/Source/Core/Common/FileUtil.cpp
+++ b/Source/Core/Common/FileUtil.cpp
@@ -631,9 +631,9 @@ void CopyDir(const std::string& source_path, const std::string& dest_path)
// Returns the current directory
std::string GetCurrentDir()
{
- char* dir;
// Get the current working directory (getcwd uses malloc)
- if (!(dir = __getcwd(nullptr, 0)))
+ char* dir = __getcwd(nullptr, 0);
+ if (!dir)
{
ERROR_LOG(COMMON, "GetCurrentDirectory failed: %s", GetLastErrorMsg().c_str());
return nullptr;
@@ -986,7 +986,7 @@ u64 IOFile::Tell() const
if (IsOpen())
return ftello(m_file);
else
- return -1;
+ return UINT64_MAX;
}
bool IOFile::Flush()