mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-19 14:43:47 +00:00
Adds data to vector out of bounds reports
Like say, if it's crashing out due to being passed a -1, or adding past the end.
This commit is contained in:
parent
c9bf6b1ae5
commit
7df625ea14
1 changed files with 2 additions and 2 deletions
|
|
@ -684,13 +684,13 @@ template<class T> inline void Vector<T>::pop_back()
|
|||
|
||||
template<class T> inline T& Vector<T>::operator[](U32 index)
|
||||
{
|
||||
AssertFatal(index < mElementCount, "Vector<T>::operator[] - out of bounds array access!");
|
||||
AssertFatal(index < mElementCount, avar("Vector<T>::operator[%i/%i] - out of bounds array access!", index, mElementCount));
|
||||
return mArray[index];
|
||||
}
|
||||
|
||||
template<class T> inline const T& Vector<T>::operator[](U32 index) const
|
||||
{
|
||||
AssertFatal(index < mElementCount, "Vector<T>::operator[] - out of bounds array access!");
|
||||
AssertFatal(index < mElementCount, avar("Vector<T>::operator[%i/%i] - out of bounds array access!", index, mElementCount));
|
||||
return mArray[index];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue