]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Replace _Hashtable::__fwd_value_for with cast
authorJonathan Wakely <jwakely@redhat.com>
Fri, 1 Nov 2024 21:52:37 +0000 (21:52 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 13 Nov 2024 20:21:39 +0000 (20:21 +0000)
commite717c322c6ee21bd5d9cf9373dcd9b4e8ba3312f
tree7eb96eb237f6c4e6cf91775b5effcb0a1f63113c
parent37b17388fca498cff718a13aa8d4523f15427c8c
libstdc++: Replace _Hashtable::__fwd_value_for with cast

We can just use a cast to the appropriate type instead of calling a
function to do it. This gives the compiler less work to compile and
optimize, and at -O0 avoids a function call per element.

libstdc++-v3/ChangeLog:

* include/bits/hashtable.h (_Hashtable::__fwd_value_for):
Remove.
(_Hashtable::_M_assign): Use static_cast instead of
__fwd_value_for.

Reviewed-by: François Dumont <fdumont@gcc.gnu.org>
libstdc++-v3/include/bits/hashtable.h