Add mate::TrackableObject
This commit is contained in:
parent
15f350edcb
commit
7f0658efa7
7 changed files with 95 additions and 2 deletions
|
@ -55,6 +55,10 @@ void IDWeakMap::Remove(int32_t id) {
|
|||
map_.erase(iter);
|
||||
}
|
||||
|
||||
void IDWeakMap::Clear() {
|
||||
map_.clear();
|
||||
}
|
||||
|
||||
int32_t IDWeakMap::GetNextID() {
|
||||
return ++next_id_;
|
||||
}
|
||||
|
|
|
@ -34,6 +34,9 @@ class IDWeakMap {
|
|||
// Remove object with |id| in the WeakMap.
|
||||
void Remove(int32_t key);
|
||||
|
||||
// Clears the weak map.
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
// Returns next available ID.
|
||||
int32_t GetNextID();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue