diff options
author | Paolo Carlini <pcarlini@suse.de> | 2007-12-01 18:31:17 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2007-12-01 18:31:17 +0000 |
commit | e78b91ce0e473db3da75800ece2f106bac3f4c1c (patch) | |
tree | 65ead973a7e7fe54ffbda3c62e671f2713833cdb /libstdc++-v3 | |
parent | d87135d45a245b35f2f143b7ca970e833af46e8d (diff) | |
download | gcc-e78b91ce0e473db3da75800ece2f106bac3f4c1c.zip gcc-e78b91ce0e473db3da75800ece2f106bac3f4c1c.tar.gz gcc-e78b91ce0e473db3da75800ece2f106bac3f4c1c.tar.bz2 |
hashtable_policy.h (struct _LessThan): Remove.
2007-12-01 Paolo Carlini <pcarlini@suse.de>
* include/tr1_impl/hashtable_policy.h (struct _LessThan): Remove.
(_Prime_rehash_policy::_M_bkt_for_elements, _Prime_rehash_policy::
_M_need_rehash): Adjust.
From-SVN: r130558
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1_impl/hashtable_policy.h | 13 |
2 files changed, 8 insertions, 11 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e5dc1f9..2c5ba2e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,11 @@ 2007-12-01 Paolo Carlini <pcarlini@suse.de> + * include/tr1_impl/hashtable_policy.h (struct _LessThan): Remove. + (_Prime_rehash_policy::_M_bkt_for_elements, _Prime_rehash_policy:: + _M_need_rehash): Adjust. + +2007-12-01 Paolo Carlini <pcarlini@suse.de> + * include/bits/stl_tempbuf.h (__get_temporary_buffer): Fold in get_temporary_buffer. diff --git a/libstdc++-v3/include/tr1_impl/hashtable_policy.h b/libstdc++-v3/include/tr1_impl/hashtable_policy.h index 79740fa..5c48504 100644 --- a/libstdc++-v3/include/tr1_impl/hashtable_policy.h +++ b/libstdc++-v3/include/tr1_impl/hashtable_policy.h @@ -66,14 +66,6 @@ namespace __detail // place to put TR1 .cc files yet. There's no good reason for any of // _Prime_rehash_policy's member functions to be inline, and there's // certainly no good reason for _Primes<> to exist at all. - struct _LessThan - { - template<typename _Tp, typename _Up> - bool - operator()(_Tp __x, _Up __y) - { return __x < __y; } - }; - template<int __ulongsize = sizeof(unsigned long)> struct _Primes { @@ -545,7 +537,7 @@ namespace __detail + _Primes<>::__n_primes); const float __min_bkts = __n / _M_max_load_factor; const unsigned long* __p = std::lower_bound(_Primes<>::__primes, __last, - __min_bkts, _LessThan()); + __min_bkts); _M_next_resize = static_cast<std::size_t>(std::ceil(*__p * _M_max_load_factor)); return *__p; @@ -575,8 +567,7 @@ namespace __detail const unsigned long* const __last = (_Primes<>::__primes + _Primes<>::__n_primes); const unsigned long* __p = std::lower_bound(_Primes<>::__primes, - __last, __min_bkts, - _LessThan()); + __last, __min_bkts); _M_next_resize = static_cast<std::size_t>(std::ceil(*__p * _M_max_load_factor)); return std::make_pair(true, *__p); |