From 1ed7f381f1200ca64dd8c8ac5abd6a7834193b2d Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 15 Apr 2009 11:00:03 -0400 Subject: 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. --- Source/cmSystemTools.cxx | 6 +++--- 1 file 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. */ -- cgit v0.12