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/os.cpp | |
parent | 5f11e1557156617366d2c316a97716172103980d (diff) | |
parent | 95a1400a2ac9de1a29fa305f45b928ce8e3044bd (diff) |
Merge pull request #37338 from lupoDharkael/nullprt
Replace NULL with nullptr
Diffstat (limited to 'core/os/os.cpp')
-rw-r--r-- | core/os/os.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp index 66ab3bbd8c..0636810e4b 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -40,7 +40,7 @@ #include <stdarg.h> -OS *OS::singleton = NULL; +OS *OS::singleton = nullptr; OS *OS::get_singleton() { @@ -184,7 +184,7 @@ void OS::dump_memory_to_file(const char *p_file) { //Memory::dump_static_mem_to_file(p_file); } -static FileAccess *_OSPRF = NULL; +static FileAccess *_OSPRF = nullptr; static void _OS_printres(Object *p_obj) { @@ -207,7 +207,7 @@ void OS::print_all_resources(String p_to_file) { Error err; _OSPRF = FileAccess::open(p_to_file, FileAccess::WRITE, &err); if (err != OK) { - _OSPRF = NULL; + _OSPRF = nullptr; ERR_FAIL_MSG("Can't print all resources to file: " + String(p_to_file) + "."); } } @@ -218,13 +218,13 @@ void OS::print_all_resources(String p_to_file) { if (_OSPRF) memdelete(_OSPRF); - _OSPRF = NULL; + _OSPRF = nullptr; } } void OS::print_resources_in_use(bool p_short) { - ResourceCache::dump(NULL, p_short); + ResourceCache::dump(nullptr, p_short); } void OS::dump_resources_to_file(const char *p_file) { @@ -523,9 +523,9 @@ OS::OS() { _allow_layered = false; _stack_bottom = (void *)(&stack_bottom); - _logger = NULL; + _logger = nullptr; - has_server_feature_callback = NULL; + has_server_feature_callback = nullptr; Vector<Logger *> loggers; loggers.push_back(memnew(StdLogger)); @@ -534,5 +534,5 @@ OS::OS() { OS::~OS() { memdelete(_logger); - singleton = NULL; + singleton = nullptr; } |