[Cmake-commits] CMake branch, next, updated. v3.5.2-821-gea4d09f

Brad King brad.king at kitware.com
Thu Jun 2 08:23:59 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  ea4d09f24085efe2b0832da0a500da983ee80505 (commit)
       via  3b08749b65d107cf9e64670be5a7fa91ad8115b2 (commit)
      from  ddd74ff94ba85c04382f33e01915350d65464682 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea4d09f24085efe2b0832da0a500da983ee80505
commit ea4d09f24085efe2b0832da0a500da983ee80505
Merge: ddd74ff 3b08749
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 2 08:23:57 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jun 2 08:23:57 2016 -0400

    Merge topic 'simplify-boolean-expressions' into next
    
    3b08749b fixup! Simplify boolean expressions


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b08749b65d107cf9e64670be5a7fa91ad8115b2
commit 3b08749b65d107cf9e64670be5a7fa91ad8115b2
Author:     Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Thu Jun 2 09:59:36 2016 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jun 2 08:22:24 2016 -0400

    fixup! Simplify boolean expressions

diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index f7db417..a20fb98 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -654,8 +654,7 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile,
     // but also do not include a date so we can fall through to
     // compare them without skipping any prefix.
     unsigned char hdr[2];
-    finModFile.read(reinterpret_cast<char*>(hdr), 2);
-    bool okay = static_cast<bool>(finModFile);
+    bool okay = !finModFile.read(reinterpret_cast<char*>(hdr), 2).fail();
     finModFile.seekg(0);
     if (!okay || hdr[0] != 0x1f || hdr[1] != 0x8b) {
       const char seq[1] = { '\n' };
diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index db32184..c7f8a2d 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -143,7 +143,7 @@ public:
   {
     this->Stream.seekg(pos);
     this->Stream.read(buf, size);
-    return static_cast<bool>(this->Stream);
+    return !this->Stream.fail();
   }
 
   // Lookup the SONAME in the DYNAMIC section.
@@ -497,7 +497,7 @@ private:
         this->NeedSwap) {
       ByteSwap(x);
     }
-    return static_cast<bool>(this->Stream);
+    return !this->Stream.fail();
   }
   bool Read(ELF_Dyn& x)
   {
@@ -505,7 +505,7 @@ private:
         this->NeedSwap) {
       ByteSwap(x);
     }
-    return static_cast<bool>(this->Stream);
+    return !this->Stream.fail();
   }
 
   bool LoadSectionHeader(ELF_Half i)
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx
index 562ff88..dee174b 100644
--- a/Source/cmGeneratedFileStream.cxx
+++ b/Source/cmGeneratedFileStream.cxx
@@ -42,7 +42,7 @@ cmGeneratedFileStream::~cmGeneratedFileStream()
   // stream will be destroyed which will close the temporary file.
   // Finally the base destructor will be called to replace the
   // destination file.
-  this->Okay = static_cast<bool>(*this);
+  this->Okay = !this->fail();
 }
 
 cmGeneratedFileStream& cmGeneratedFileStream::Open(const char* name,
@@ -71,7 +71,7 @@ cmGeneratedFileStream& cmGeneratedFileStream::Open(const char* name,
 bool cmGeneratedFileStream::Close()
 {
   // Save whether the temporary output file is valid before closing.
-  this->Okay = static_cast<bool>(*this);
+  this->Okay = !this->fail();
 
   // Close the temporary output file.
   this->Stream::close();

-----------------------------------------------------------------------

Summary of changes:
 Source/cmDependsFortran.cxx      |    3 +--
 Source/cmELF.cxx                 |    6 +++---
 Source/cmGeneratedFileStream.cxx |    4 ++--
 3 files changed, 6 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list