Remove reundant const-qualification from cast targets
authorJonathan Wakely <jwakely@redhat.com>
Thu, 27 Apr 2017 15:17:05 +0000 (16:17 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 27 Apr 2017 15:17:05 +0000 (16:17 +0100)
* 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

libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp
libstdc++-v3/testsuite/util/testsuite_rng.h

index b7d1727d5cada87f470cde521aa978e8a81835f1..fed2557d850fca17403b65eceba691b3f4bef83c 100644 (file)
@@ -1,3 +1,10 @@
+2017-04-27  Jonathan Wakely  <jwakely@redhat.com>
+
+       * 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  <jwakely@redhat.com>
 
        * testsuite/23_containers/deque/allocator/move_assign-2.cc: Improve
index 91fef5159772acd91c810d207349e9c47b86571f..a1b6ed5e58dd2ca96d056c1bec9e44bd386feef4 100644 (file)
@@ -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<PB_DS_CLASS_C_DEC* const>(this));
+  return const_iterator(0, 0, const_cast<PB_DS_CLASS_C_DEC*>(this));
 }
 
index fd232fc9db61a8a252ae9a368a39af44a85b8361..84fa750f0521b1e843f23c2e0668dd1a9a3ad572 100644 (file)
@@ -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<const double>(max - min);
-       const double res = static_cast<const double>(m_base_generator() - min);
+       const double range = static_cast<double>(max - min);
+       const double res = static_cast<double>(m_base_generator() - min);
        const double ret = res / range;
        _GLIBCXX_DEBUG_ASSERT(ret >= 0 && ret <= 1);
        return ret;