Added TreeTablePath::RemoveLastComponent().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31745 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-07-25 00:21:14 +00:00
parent d8c41ef38f
commit 20e4297b61
2 changed files with 13 additions and 0 deletions

View File

@ -66,6 +66,18 @@ TreeTablePath::AddComponent(int32 childIndex)
}
}
int32
TreeTablePath::RemoveLastComponent()
{
if (fComponents.empty())
return -1;
int32 index = fComponents.back();
fComponents.pop_back();
return index;
}
void
TreeTablePath::Clear()
{

View File

@ -29,6 +29,7 @@ public:
~TreeTablePath();
bool AddComponent(int32 childIndex);
int32 RemoveLastComponent();
void Clear();
int32 CountComponents() const;