diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-02 14:52:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 14:52:36 +0200 |
commit | 058a0afdeca83145d58a95c426dd01216c397ea9 (patch) | |
tree | be0cd59e5a90926e9d653fed9f3b1b77e735ca2f /core/dictionary.cpp | |
parent | 5f11e1557156617366d2c316a97716172103980d (diff) | |
parent | 95a1400a2ac9de1a29fa305f45b928ce8e3044bd (diff) |
Merge pull request #37338 from lupoDharkael/nullprt
Replace NULL with nullptr
Diffstat (limited to 'core/dictionary.cpp')
-rw-r--r-- | core/dictionary.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/dictionary.cpp b/core/dictionary.cpp index cdb518228b..bc3b792bd5 100644 --- a/core/dictionary.cpp +++ b/core/dictionary.cpp @@ -90,7 +90,7 @@ const Variant *Dictionary::getptr(const Variant &p_key) const { OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::ConstElement E = ((const OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator> *)&_p->variant_map)->find(p_key); if (!E) - return NULL; + return nullptr; return &E.get(); } @@ -99,7 +99,7 @@ Variant *Dictionary::getptr(const Variant &p_key) { OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.find(p_key); if (!E) - return NULL; + return nullptr; return &E.get(); } @@ -186,7 +186,7 @@ void Dictionary::_unref() const { if (_p->refcount.unref()) { memdelete(_p); } - _p = NULL; + _p = nullptr; } uint32_t Dictionary::hash() const { @@ -236,17 +236,17 @@ Array Dictionary::values() const { const Variant *Dictionary::next(const Variant *p_key) const { - if (p_key == NULL) { + if (p_key == nullptr) { // caller wants to get the first element if (_p->variant_map.front()) return &_p->variant_map.front().key(); - return NULL; + return nullptr; } OrderedHashMap<Variant, Variant, VariantHasher, VariantComparator>::Element E = _p->variant_map.find(*p_key); if (E && E.next()) return &E.next().key(); - return NULL; + return nullptr; } Dictionary Dictionary::duplicate(bool p_deep) const { @@ -270,7 +270,7 @@ const void *Dictionary::id() const { } Dictionary::Dictionary(const Dictionary &p_from) { - _p = NULL; + _p = nullptr; _ref(p_from); } |