Remove redundant conditional expressions in <system_error>
authorJonathan Wakely <jwakely@redhat.com>
Thu, 17 Sep 2015 14:56:50 +0000 (15:56 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 17 Sep 2015 14:56:50 +0000 (15:56 +0100)
* include/std/system_error (error_code::operator bool(),
error_condition::operator bool()): Remove redundant conditional
expression.

From-SVN: r227871

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/system_error

index 2bcfa16..c70ad43 100644 (file)
@@ -1,5 +1,9 @@
 2015-09-17  Jonathan Wakely  <jwakely@redhat.com>
 
+       * include/std/system_error (error_code::operator bool(),
+       error_condition::operator bool()): Remove redundant conditional
+       expression.
+
        * include/bits/allocator.h (__shrink_to_fit_aux<T, true>::_S_do_it):
        Do nothing if exceptions are disabled.
        * include/bits/basic_string.h (basic_string::shrink_to_fit): Likewise.
index 92f8af9..cc82bdf 100644 (file)
@@ -181,7 +181,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     { return category().message(value()); }
 
     explicit operator bool() const noexcept
-    { return _M_value != 0 ? true : false; }
+    { return _M_value != 0; }
 
     // DR 804.
   private:
@@ -257,7 +257,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     { return category().message(value()); }
 
     explicit operator bool() const noexcept
-    { return _M_value != 0 ? true : false; }
+    { return _M_value != 0; }
 
     // DR 804.
   private: