OPEN-358 Readable error

master
Andrey Kleshchev 2022-01-26 02:26:19 +02:00
parent 1f542bf542
commit efd41b35ac
1 changed files with 8 additions and 2 deletions

View File

@ -116,14 +116,20 @@ void LLAlignedArray<T, alignment>::resize(U32 size)
template <class T, U32 alignment>
T& LLAlignedArray<T, alignment>::operator[](int idx)
{
llassert(idx < mElementCount);
if(idx >= mElementCount)
{
LL_ERRS() << "Out of bounds LLAlignedArray, requested: " << (S32)idx << " size: " << mElementCount << LL_ENDL;
}
return mArray[idx];
}
template <class T, U32 alignment>
const T& LLAlignedArray<T, alignment>::operator[](int idx) const
{
llassert(idx < mElementCount);
if (idx >= mElementCount)
{
LL_ERRS() << "Out of bounds LLAlignedArray, requested: " << (S32)idx << " size: " << mElementCount << LL_ENDL;
}
return mArray[idx];
}