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 /drivers/unix/file_access_unix.cpp | |
parent | 5f11e1557156617366d2c316a97716172103980d (diff) | |
parent | 95a1400a2ac9de1a29fa305f45b928ce8e3044bd (diff) | |
download | redot-engine-058a0afdeca83145d58a95c426dd01216c397ea9.tar.gz |
Merge pull request #37338 from lupoDharkael/nullprt
Replace NULL with nullptr
Diffstat (limited to 'drivers/unix/file_access_unix.cpp')
-rw-r--r-- | drivers/unix/file_access_unix.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp index 91164dc3f9..4aa408a1f0 100644 --- a/drivers/unix/file_access_unix.cpp +++ b/drivers/unix/file_access_unix.cpp @@ -76,7 +76,7 @@ Error FileAccessUnix::_open(const String &p_path, int p_mode_flags) { if (f) fclose(f); - f = NULL; + f = nullptr; path_src = p_path; path = fix_path(p_path); @@ -119,7 +119,7 @@ Error FileAccessUnix::_open(const String &p_path, int p_mode_flags) { f = fopen(path.utf8().get_data(), mode_string); - if (f == NULL) { + if (f == nullptr) { switch (errno) { case ENOENT: { last_error = ERR_FILE_NOT_FOUND; @@ -155,7 +155,7 @@ void FileAccessUnix::close() { return; fclose(f); - f = NULL; + f = nullptr; if (close_notification_func) { close_notification_func(path, flags); @@ -175,7 +175,7 @@ void FileAccessUnix::close() { bool FileAccessUnix::is_open() const { - return (f != NULL); + return (f != nullptr); } String FileAccessUnix::get_path() const { @@ -352,10 +352,10 @@ FileAccess *FileAccessUnix::create_libc() { return memnew(FileAccessUnix); } -CloseNotificationFunc FileAccessUnix::close_notification_func = NULL; +CloseNotificationFunc FileAccessUnix::close_notification_func = nullptr; FileAccessUnix::FileAccessUnix() : - f(NULL), + f(nullptr), flags(0), last_error(OK) { } |