Fix warning due to signedness

Fixes #334
This commit is contained in:
Jakob Botsch Nielsen 2018-06-16 01:32:32 +02:00 committed by Jakob Botsch Nielsen
parent c2d7463a38
commit 5c24b5960f

View File

@ -172,7 +172,7 @@ bool rcVectorBase<T, H>::reserve(rcSizeType count) {
}
template <typename T, rcAllocHint H>
T* rcVectorBase<T, H>::allocate_and_copy(rcSizeType size) {
rcAssert(RC_SIZE_MAX / sizeof(T) >= size);
rcAssert(RC_SIZE_MAX / static_cast<rcSizeType>(sizeof(T)) >= size);
T* new_data = static_cast<T*>(rcAlloc(sizeof(T) * size, H));
if (new_data) {
copy_range(new_data, m_data, m_data + m_size);