Replace NULL with nullptr
This commit is contained in:
parent
5f11e15571
commit
95a1400a2a
755 changed files with 5742 additions and 5742 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue