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/os/dir_access.cpp | |
parent | 5f11e1557156617366d2c316a97716172103980d (diff) | |
parent | 95a1400a2ac9de1a29fa305f45b928ce8e3044bd (diff) |
Merge pull request #37338 from lupoDharkael/nullprt
Replace NULL with nullptr
Diffstat (limited to 'core/os/dir_access.cpp')
-rw-r--r-- | core/os/dir_access.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index 642c86be2f..94c8cd5d73 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -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; } |