From: Jonathan Wakely Date: Thu, 27 Apr 2017 15:17:05 +0000 (+0100) Subject: Remove reundant const-qualification from cast targets X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4ca4927ac62079290939b2b93124ee8e09864491;p=gcc.git Remove reundant const-qualification from cast targets * include/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp (PB_DS_CLASS_C_DEC::end()): Remove redundant const in cast type. * testsuite/util/testsuite_rng.h (twister_rand_gen::get_prob()): Likewise. From-SVN: r247346 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index b7d1727d5ca..fed2557d850 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2017-04-27 Jonathan Wakely + + * include/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp + (PB_DS_CLASS_C_DEC::end()): Remove redundant const in cast type. + * testsuite/util/testsuite_rng.h (twister_rand_gen::get_prob()): + Likewise. + 2017-04-26 Jonathan Wakely * testsuite/23_containers/deque/allocator/move_assign-2.cc: Improve diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp index 91fef515977..a1b6ed5e58d 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp @@ -75,6 +75,6 @@ inline typename PB_DS_CLASS_C_DEC::const_iterator PB_DS_CLASS_C_DEC:: end() const { - return const_iterator(0, 0, const_cast(this)); + return const_iterator(0, 0, const_cast(this)); } diff --git a/libstdc++-v3/testsuite/util/testsuite_rng.h b/libstdc++-v3/testsuite/util/testsuite_rng.h index fd232fc9db6..84fa750f052 100644 --- a/libstdc++-v3/testsuite/util/testsuite_rng.h +++ b/libstdc++-v3/testsuite/util/testsuite_rng.h @@ -79,8 +79,8 @@ namespace __gnu_pbds { const double min = m_base_generator.min(); const double max = m_base_generator.max(); - const double range = static_cast(max - min); - const double res = static_cast(m_base_generator() - min); + const double range = static_cast(max - min); + const double res = static_cast(m_base_generator() - min); const double ret = res / range; _GLIBCXX_DEBUG_ASSERT(ret >= 0 && ret <= 1); return ret;