Remove unnecessary non-const accessors in hash table bases
authorJonathan Wakely <jwakely@redhat.com>
Thu, 16 May 2019 10:04:50 +0000 (11:04 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 16 May 2019 10:04:50 +0000 (11:04 +0100)
commit0bc229dbbe2a109ea39d08ced1bb296c59bcd120
treea33625dd7b815900c4872972d8f8a1a082241b1f
parent4b8e35f1b1df60633aeb0bf37ea9f6311f2132b9
Remove unnecessary non-const accessors in hash table bases

The const accessors are OK (and arguably more correct) for most callers
to use. The _M_swap functions that use the non-const overloads can just
directly use the _S_get members of the EBO helpers.

* include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
_S_get accessors for members in EBO helpers.
(_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
(_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
overloads.
(_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
helpers.
(_Hashtable_base::_M_eq()): Remove non-const overload.

From-SVN: r271286
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/hashtable_policy.h