Added SetIndexAt(), replacing an existing index.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33906 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user