Core: Use std::array for managing kernel object space
These avoid relying on memset for clearing the arrays.
This commit is contained in:
parent
e9c5c563a5
commit
ab4648d3ca
2 changed files with 5 additions and 5 deletions
|
@ -17,7 +17,6 @@ Handle g_main_thread = 0;
|
|||
ObjectPool g_object_pool;
|
||||
|
||||
ObjectPool::ObjectPool() {
|
||||
memset(occupied, 0, sizeof(bool) * MAX_COUNT);
|
||||
next_id = INITIAL_NEXT_ID;
|
||||
}
|
||||
|
||||
|
@ -57,7 +56,7 @@ void ObjectPool::Clear() {
|
|||
delete pool[i];
|
||||
occupied[i] = false;
|
||||
}
|
||||
memset(pool, 0, sizeof(Object*)*MAX_COUNT);
|
||||
pool.fill(nullptr);
|
||||
next_id = INITIAL_NEXT_ID;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue