Updated the aliases and switched from u64 to size_t in the for loops
This commit is contained in:
1 parent
e1806bafc2
commit
b95cff5f0c
5 files changed
+16
-12
No files matched your search
+2
-2
@@ -46,7 +46,7 @@ bool object_exists(ObjectStore *os, void *object) {
|
||||
// This is a crude implementation for checking that an object has already
|
||||
// been added.
|
||||
// TODO (Abdelrahman): Figure out if there is a better way of doing this
|
||||
for (u64 i = 0; i < MAX_OBJ_COUNT; ++i) {
|
||||
for (size_t i = 0; i < MAX_OBJ_COUNT; ++i) {
|
||||
if (object == os->object_ptrs[i]) {
|
||||
return true;
|
||||
}
|
||||
@@ -150,7 +150,7 @@ void destroy_object_store(ObjectStore **os) {
|
||||
// TODO (Abdelrahman): Figure out if there is a better way to remove all of
|
||||
// the existing objects without having to loop for the maximum number of
|
||||
// objects allowed.
|
||||
for (u64 i = 0; i < MAX_OBJ_COUNT; ++i) {
|
||||
for (size_t i = 0; i < MAX_OBJ_COUNT; ++i) {
|
||||
(*os)->object_ptrs[i] = NULL;
|
||||
(*os)->event_handlers[i] = NULL;
|
||||
(*os)->update_funcs[i] = NULL;
|
||||
|
||||
Reference in new issue
Block a user