Replace NULL with nullptr

This commit is contained in:
lupoDharkael
2020-04-02 01:20:12 +02:00
parent 5f11e15571
commit 95a1400a2a
755 changed files with 5742 additions and 5742 deletions

View File

@ -226,11 +226,11 @@ String DirAccess::fix_path(String p_path) const {
return p_path;
}
DirAccess::CreateFunc DirAccess::create_func[ACCESS_MAX] = { 0, 0, 0 };
DirAccess::CreateFunc DirAccess::create_func[ACCESS_MAX] = { nullptr, nullptr, nullptr };
DirAccess *DirAccess::create_for_path(const String &p_path) {
DirAccess *da = NULL;
DirAccess *da = nullptr;
if (p_path.begins_with("res://")) {
da = create(ACCESS_RESOURCES);
@ -249,13 +249,13 @@ DirAccess *DirAccess::open(const String &p_path, Error *r_error) {
DirAccess *da = create_for_path(p_path);
ERR_FAIL_COND_V_MSG(!da, NULL, "Cannot create DirAccess for path '" + p_path + "'.");
ERR_FAIL_COND_V_MSG(!da, nullptr, "Cannot create DirAccess for path '" + p_path + "'.");
Error err = da->change_dir(p_path);
if (r_error)
*r_error = err;
if (err != OK) {
memdelete(da);
return NULL;
return nullptr;
}
return da;
@ -263,7 +263,7 @@ DirAccess *DirAccess::open(const String &p_path, Error *r_error) {
DirAccess *DirAccess::create(AccessType p_access) {
DirAccess *da = create_func[p_access] ? create_func[p_access]() : NULL;
DirAccess *da = create_func[p_access] ? create_func[p_access]() : nullptr;
if (da) {
da->_access_type = p_access;
}