diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2015-09-17 15:56:50 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2015-09-17 15:56:50 +0100 |
commit | 2eb57e545ba21b1776371acf6cb11bc28233bd82 (patch) | |
tree | 2284dd9f498d7197170c1834af9b00070e69e77c /libstdc++-v3 | |
parent | 99f04955edfdff11e3270df6326f426a29e1ec5a (diff) | |
download | gcc-2eb57e545ba21b1776371acf6cb11bc28233bd82.zip gcc-2eb57e545ba21b1776371acf6cb11bc28233bd82.tar.gz gcc-2eb57e545ba21b1776371acf6cb11bc28233bd82.tar.bz2 |
Remove redundant conditional expressions in <system_error>
* include/std/system_error (error_code::operator bool(),
error_condition::operator bool()): Remove redundant conditional
expression.
From-SVN: r227871
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/std/system_error | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2bcfa16..c70ad43 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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. diff --git a/libstdc++-v3/include/std/system_error b/libstdc++-v3/include/std/system_error index 92f8af9..cc82bdf 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: |