[winpr,collections] fix cast to float

This commit is contained in:
akallabeth 2024-09-13 12:59:19 +02:00
parent d7f6cf90b4
commit 5a711f5ae4
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5

View File

@ -121,7 +121,8 @@ static INLINE size_t HashTable_CalculateIdealNumOfBuckets(wHashTable* table)
{
WINPR_ASSERT(table);
const float tmp = (table->numOfElements / table->idealRatio);
const float numOfElements = (float)table->numOfElements;
const float tmp = (numOfElements / table->idealRatio);
size_t idealNumOfBuckets = (size_t)tmp;
if (idealNumOfBuckets < 5)