diff options
author | Brad King <brad.king@kitware.com> | 2009-04-15 15:00:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-04-15 15:00:03 (GMT) |
commit | 1ed7f381f1200ca64dd8c8ac5abd6a7834193b2d (patch) | |
tree | aacc1eabdbe3a4821d0eb94dddb604dad1556908 /Source/cmSystemTools.cxx | |
parent | f3035ff78d77b09eccd9e1f3881663e50ea204e4 (diff) | |
download | CMake-1ed7f381f1200ca64dd8c8ac5abd6a7834193b2d.zip CMake-1ed7f381f1200ca64dd8c8ac5abd6a7834193b2d.tar.gz CMake-1ed7f381f1200ca64dd8c8ac5abd6a7834193b2d.tar.bz2 |
COMP: Fix BOOL to bool conversion warning
The cmSystemTools::RenameFile method returns type bool, but its
implementation on Windows returns the result of an API function that
returns BOOL. This change avoids the compiler warning.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 4fb9afa..6ed45b1 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1139,18 +1139,18 @@ bool cmSystemTools::RenameFile(const char* oldname, const char* newname) cannot quite rename the file atomically. Just delete the destination and then move the file. */ DeleteFile(newname); - return MoveFile(oldname, newname); + return MoveFile(oldname, newname) != 0; } else { /* This is not Win9x. Use the MoveFileEx implementation. */ - return MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING); + return MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING) != 0; } } else { /* The destination does not exist. Just move the file. */ - return MoveFile(oldname, newname); + return MoveFile(oldname, newname) != 0; } #else /* On UNIX we have an OS-provided call to do this atomically. */ |