Change more to errors

Should never happen, and be shown in release builds.
This commit is contained in:
Kawe Mazidjatari 2023-08-09 15:31:22 +02:00
parent 298bab630e
commit fa4325eda0

View File

@ -754,7 +754,7 @@ void CUtlMemory<T, I>::Grow(int64 num)
if (IsExternallyAllocated())
{
// Can't grow a buffer whose memory was externally allocated
Assert(0);
Error(eDLL_T::COMMON, EXIT_FAILURE, "EnsureCapacity( %zd ) called for external buffer of size %zd.\n", num, m_nAllocationCount);
return;
}
@ -1046,7 +1046,7 @@ void CUtlMemoryAligned<T, nAlignment>::Grow(int64 num)
if (this->IsExternallyAllocated())
{
// Can't grow a buffer whose memory was externally allocated
Assert(0);
Error(eDLL_T::COMMON, EXIT_FAILURE, "EnsureCapacity( %zd ) called for external buffer of size %zd.\n", num, CUtlMemory<T>::m_nAllocationCount);
return;
}
@ -1087,7 +1087,7 @@ inline void CUtlMemoryAligned<T, nAlignment>::EnsureCapacity(int64 num)
if (this->IsExternallyAllocated())
{
// Can't grow a buffer whose memory was externally allocated
Assert(0);
Error(eDLL_T::COMMON, EXIT_FAILURE, "EnsureCapacity( %zd ) called for external buffer of size %zd.\n", num, CUtlMemory<T>::m_nAllocationCount);
return;
}