diff options
author | Regina Pfeifer <regina@mailbox.org> | 2018-11-19 22:35:09 (GMT) |
---|---|---|
committer | Regina Pfeifer <regina@mailbox.org> | 2018-11-19 22:35:09 (GMT) |
commit | a2648dda97454efdc8c785d83cf039f6d2383e9e (patch) | |
tree | aacfe1e67c59539984df7229c9d6f645792681b1 /Source/cmArchiveWrite.h | |
parent | 1dc85a6652bc8255ff7a9ef39028a7df45e3007b (diff) | |
download | CMake-a2648dda97454efdc8c785d83cf039f6d2383e9e.zip CMake-a2648dda97454efdc8c785d83cf039f6d2383e9e.tar.gz CMake-a2648dda97454efdc8c785d83cf039f6d2383e9e.tar.bz2 |
Mark operator bool explicit
Diffstat (limited to 'Source/cmArchiveWrite.h')
-rw-r--r-- | Source/cmArchiveWrite.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Source/cmArchiveWrite.h b/Source/cmArchiveWrite.h index 6c678ac..6ecdd63 100644 --- a/Source/cmArchiveWrite.h +++ b/Source/cmArchiveWrite.h @@ -40,9 +40,6 @@ private: */ class cmArchiveWrite { - typedef void (cmArchiveWrite::*safe_bool)(); - void safe_bool_true() {} - public: /** Compression type. */ enum Compress @@ -73,10 +70,7 @@ public: bool recursive = true); /** Returns true if there has been no error. */ - operator safe_bool() const - { - return this->Okay() ? &cmArchiveWrite::safe_bool_true : nullptr; - } + explicit operator bool() const { return this->Okay(); } /** Returns true if there has been an error. */ bool operator!() const { return !this->Okay(); } |