removed unnecessary check in max_load

This commit is contained in:
joaquintides
2022-09-28 09:45:55 +02:00
parent 43f8e5e933
commit 7a1a25991f

View File

@ -729,15 +729,10 @@ private:
std::size_t max_load()const
{
if(!arrays.elements){
return 0;
}
else {
float fml=mlf*(float)(capacity());
auto res=(std::numeric_limits<std::size_t>::max)();
if(res>(std::size_t)fml)res=(std::size_t)fml;
return res;
}
float fml=mlf*(float)(capacity());
auto res=(std::numeric_limits<std::size_t>::max)();
if(res>(std::size_t)fml)res=(std::size_t)fml;
return res;
}
static inline auto key_from(const value_type& x)