Avoid mixing types in CompressedStorage.h

This commit is contained in:
Rasmus Munk Larsen 2022-12-16 20:11:02 +00:00
parent 4bb2446796
commit 3d8a8def8a

View File

@ -92,7 +92,7 @@ class CompressedStorage
{ {
if (m_allocatedSize<size) if (m_allocatedSize<size)
{ {
Index realloc_size = (std::min<Index>)(NumTraits<StorageIndex>::highest(), size + Index(reserveSizeFactor*double(size))); Index realloc_size = (std::min<Index>)(NumTraits<Index>::highest(), size + Index(reserveSizeFactor*double(size)));
if(realloc_size<size) if(realloc_size<size)
internal::throw_std_bad_alloc(); internal::throw_std_bad_alloc();
reallocate(realloc_size); reallocate(realloc_size);