// Return a bucket count appropriate for n elements
std::size_t
_M_bkt_for_elements(std::size_t __n) const
- { return __builtin_ceill(__n / (long double)_M_max_load_factor); }
+ { return __builtin_ceill(__n / (double)_M_max_load_factor); }
// __n_bkt is current bucket count, __n_elt is current element count,
// and __n_ins is number of elements to be inserted. Do we need to
_M_next_resize = size_t(-1);
else
_M_next_resize
- = __builtin_floorl(__res * (long double)_M_max_load_factor);
+ = __builtin_floorl(__res * (double)_M_max_load_factor);
return __res;
}
// Return a bucket count appropriate for n elements
std::size_t
_M_bkt_for_elements(std::size_t __n) const noexcept
- { return __builtin_ceill(__n / (long double)_M_max_load_factor); }
+ { return __builtin_ceill(__n / (double)_M_max_load_factor); }
// __n_bkt is current bucket count, __n_elt is current element count,
// and __n_ins is number of elements to be inserted. Do we need to
// If _M_next_resize is 0 it means that we have nothing allocated so
// far and that we start inserting elements. In this case we start
// with an initial bucket size of 11.
- long double __min_bkts
+ double __min_bkts
= std::max<std::size_t>(__n_elt + __n_ins, _M_next_resize ? 0 : 11)
- / (long double)_M_max_load_factor;
+ / (double)_M_max_load_factor;
if (__min_bkts >= __n_bkt)
return { true,
_M_next_bkt(std::max<std::size_t>(__builtin_floorl(__min_bkts) + 1,
__n_bkt * _S_growth_factor)) };
_M_next_resize
- = __builtin_floorl(__n_bkt * (long double)_M_max_load_factor);
+ = __builtin_floorl(__n_bkt * (double)_M_max_load_factor);
return { false, 0 };
}
else