diff --git a/Source/Engine/Core/Collections/Array.h b/Source/Engine/Core/Collections/Array.h index a8390f051..9c50c5ccf 100644 --- a/Source/Engine/Core/Collections/Array.h +++ b/Source/Engine/Core/Collections/Array.h @@ -737,7 +737,18 @@ public: ::Swap(other, *this); } } - + + /// + /// Determines if is valid index. + /// + /// The index. + /// + /// true if is valid a index; otherwise, false. + /// + bool IsValidIndex(int index) const + { + return index < _count && index >= 0; + } /// /// Reverses the order of the added items in the collection. ///