summaryrefslogtreecommitdiff
path: root/core/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/resource.cpp')
-rw-r--r--core/resource.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/resource.cpp b/core/resource.cpp
index e329a1574f..d1883d8043 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -328,7 +328,7 @@ Node *Resource::get_local_scene() const {
return _get_local_scene_func();
}
- return NULL;
+ return nullptr;
}
void Resource::setup_local_to_scene() {
@@ -337,7 +337,7 @@ void Resource::setup_local_to_scene() {
get_script_instance()->call("_setup_local_to_scene");
}
-Node *(*Resource::_get_local_scene_func)() = NULL;
+Node *(*Resource::_get_local_scene_func)() = nullptr;
void Resource::set_as_translation_remapped(bool p_remapped) {
@@ -438,7 +438,7 @@ Resource::Resource() :
subindex = 0;
local_to_scene = false;
- local_scene = NULL;
+ local_scene = nullptr;
}
Resource::~Resource() {
@@ -458,9 +458,9 @@ HashMap<String, Resource *> ResourceCache::resources;
HashMap<String, HashMap<String, int>> ResourceCache::resource_path_cache;
#endif
-RWLock *ResourceCache::lock = NULL;
+RWLock *ResourceCache::lock = nullptr;
#ifdef TOOLS_ENABLED
-RWLock *ResourceCache::path_cache_lock = NULL;
+RWLock *ResourceCache::path_cache_lock = nullptr;
#endif
void ResourceCache::setup() {
@@ -482,7 +482,7 @@ void ResourceCache::clear() {
void ResourceCache::reload_externals() {
/*
- const String *K=NULL;
+ const String *K=nullptr;
while ((K=resources.next(K))) {
resources[*K]->reload_external_data();
}
@@ -506,7 +506,7 @@ Resource *ResourceCache::get(const String &p_path) {
lock->read_unlock();
if (!res) {
- return NULL;
+ return nullptr;
}
return *res;
@@ -515,7 +515,7 @@ Resource *ResourceCache::get(const String &p_path) {
void ResourceCache::get_cached_resources(List<Ref<Resource>> *p_resources) {
lock->read_lock();
- const String *K = NULL;
+ const String *K = nullptr;
while ((K = resources.next(K))) {
Resource *r = resources[*K];
@@ -539,13 +539,13 @@ void ResourceCache::dump(const char *p_file, bool p_short) {
Map<String, int> type_count;
- FileAccess *f = NULL;
+ FileAccess *f = nullptr;
if (p_file) {
f = FileAccess::open(p_file, FileAccess::WRITE);
ERR_FAIL_COND_MSG(!f, "Cannot create file at path '" + String(p_file) + "'.");
}
- const String *K = NULL;
+ const String *K = nullptr;
while ((K = resources.next(K))) {
Resource *r = resources[*K];