diff --git a/src/apps/debugger/types/ArrayIndexPath.h b/src/apps/debugger/types/ArrayIndexPath.h index a0e48aaf10..834444e3da 100644 --- a/src/apps/debugger/types/ArrayIndexPath.h +++ b/src/apps/debugger/types/ArrayIndexPath.h @@ -27,7 +27,7 @@ public: inline int32 CountIndices() const; inline int64 IndexAt(int32 index) const; inline bool AddIndex(int64 index); - + inline void SetIndexAt(int32 at, int64 newIndex); ArrayIndexPath& operator=(const ArrayIndexPath& other); @@ -61,4 +61,12 @@ ArrayIndexPath::AddIndex(int64 index) } +void +ArrayIndexPath::SetIndexAt(int32 at, int64 newIndex) +{ + if (at >= 0 && at < fIndices.Count()) + fIndices[at] = newIndex; +} + + #endif // ARRAY_INDEX_PATH_H