diff options
Diffstat (limited to 'core/ordered_hash_map.h')
-rw-r--r-- | core/ordered_hash_map.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/core/ordered_hash_map.h b/core/ordered_hash_map.h index 055e3e607e..05debd529f 100644 --- a/core/ordered_hash_map.h +++ b/core/ordered_hash_map.h @@ -70,9 +70,9 @@ public: public: _FORCE_INLINE_ Element() : - list_element(NULL), - prev_element(NULL), - next_element(NULL) { + list_element(nullptr), + prev_element(nullptr), + next_element(nullptr) { } Element next() const { @@ -104,7 +104,7 @@ public: } operator bool() const { - return (list_element != NULL); + return (list_element != nullptr); } const K &key() const { @@ -144,7 +144,7 @@ public: public: _FORCE_INLINE_ ConstElement() : - list_element(NULL) { + list_element(nullptr) { } ConstElement(const ConstElement &other) : @@ -157,11 +157,11 @@ public: } ConstElement next() const { - return ConstElement(list_element ? list_element->next() : NULL); + return ConstElement(list_element ? list_element->next() : nullptr); } ConstElement prev() const { - return ConstElement(list_element ? list_element->prev() : NULL); + return ConstElement(list_element ? list_element->prev() : nullptr); } _FORCE_INLINE_ bool operator==(const ConstElement &p_other) const { @@ -172,7 +172,7 @@ public: } operator bool() const { - return (list_element != NULL); + return (list_element != nullptr); } const K &key() const { @@ -196,7 +196,7 @@ public: if (list_element) { return ConstElement(*list_element); } - return ConstElement(NULL); + return ConstElement(nullptr); } Element find(const K &p_key) { @@ -204,7 +204,7 @@ public: if (list_element) { return Element(*list_element); } - return Element(NULL); + return Element(nullptr); } Element insert(const K &p_key, const V &p_value) { @@ -213,7 +213,7 @@ public: (*list_element)->get().second = p_value; return Element(*list_element); } - typename InternalList::Element *new_element = list.push_back(Pair<const K *, V>(NULL, p_value)); + typename InternalList::Element *new_element = list.push_back(Pair<const K *, V>(nullptr, p_value)); typename InternalMap::Element *e = map.set(p_key, new_element); new_element->get().first = &e->key(); @@ -223,7 +223,7 @@ public: void erase(Element &p_element) { map.erase(p_element.key()); list.erase(p_element.list_element); - p_element.list_element = NULL; + p_element.list_element = nullptr; } bool erase(const K &p_key) { |