From: Jonathan Wakely Date: Thu, 17 Sep 2015 14:56:50 +0000 (+0100) Subject: Remove redundant conditional expressions in X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2eb57e545ba21b1776371acf6cb11bc28233bd82;p=gcc.git Remove redundant conditional expressions in * include/std/system_error (error_code::operator bool(), error_condition::operator bool()): Remove redundant conditional expression. From-SVN: r227871 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2bcfa161fcf..c70ad43a2eb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2015-09-17 Jonathan Wakely + * include/std/system_error (error_code::operator bool(), + error_condition::operator bool()): Remove redundant conditional + expression. + * include/bits/allocator.h (__shrink_to_fit_aux::_S_do_it): Do nothing if exceptions are disabled. * include/bits/basic_string.h (basic_string::shrink_to_fit): Likewise. diff --git a/libstdc++-v3/include/std/system_error b/libstdc++-v3/include/std/system_error index 92f8af97efc..cc82bdfe49f 100644 --- a/libstdc++-v3/include/std/system_error +++ b/libstdc++-v3/include/std/system_error @@ -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: