You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Replace NULL with nullptr
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user