summaryrefslogtreecommitdiff
path: root/core/rid_owner.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/rid_owner.h')
-rw-r--r--core/rid_owner.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/rid_owner.h b/core/rid_owner.h
index 5c8c48a4cb..946b2e396c 100644
--- a/core/rid_owner.h
+++ b/core/rid_owner.h
@@ -142,7 +142,7 @@ public:
if (THREAD_SAFE) {
spin_lock.unlock();
}
- return NULL;
+ return nullptr;
}
uint32_t idx_chunk = idx / elements_in_chunk;
@@ -153,7 +153,7 @@ public:
if (THREAD_SAFE) {
spin_lock.unlock();
}
- return NULL;
+ return nullptr;
}
T *ptr = &chunks[idx_chunk][idx_element];
@@ -236,7 +236,7 @@ public:
}
_FORCE_INLINE_ T *get_ptr_by_index(uint32_t p_index) {
- ERR_FAIL_INDEX_V(p_index, alloc_count, NULL);
+ ERR_FAIL_INDEX_V(p_index, alloc_count, nullptr);
if (THREAD_SAFE) {
spin_lock.lock();
}
@@ -283,14 +283,14 @@ public:
}
RID_Alloc(uint32_t p_target_chunk_byte_size = 4096) {
- chunks = NULL;
- free_list_chunks = NULL;
- validator_chunks = NULL;
+ chunks = nullptr;
+ free_list_chunks = nullptr;
+ validator_chunks = nullptr;
elements_in_chunk = sizeof(T) > p_target_chunk_byte_size ? 1 : (p_target_chunk_byte_size / sizeof(T));
max_alloc = 0;
alloc_count = 0;
- description = NULL;
+ description = nullptr;
}
~RID_Alloc() {
@@ -340,7 +340,7 @@ public:
_FORCE_INLINE_ T *getornull(const RID &p_rid) {
T **ptr = alloc.getornull(p_rid);
if (unlikely(!ptr)) {
- return NULL;
+ return nullptr;
}
return *ptr;
}