mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
This commit is contained in:
parent
2b429b24b5
commit
a828398655
633 changed files with 4454 additions and 4410 deletions
|
|
@ -219,7 +219,7 @@ bool VisualScriptYieldSignal::has_input_sequence_port() const {
|
|||
|
||||
static Node *_find_script_node(Node *p_edited_scene, Node *p_current_node, const Ref<Script> &script) {
|
||||
if (p_edited_scene != p_current_node && p_current_node->get_owner() != p_edited_scene)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
Ref<Script> scr = p_current_node->get_script();
|
||||
|
||||
|
|
@ -232,7 +232,7 @@ static Node *_find_script_node(Node *p_edited_scene, Node *p_current_node, const
|
|||
return n;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -240,26 +240,26 @@ Node *VisualScriptYieldSignal::_get_base_node() const {
|
|||
#ifdef TOOLS_ENABLED
|
||||
Ref<Script> script = get_visual_script();
|
||||
if (!script.is_valid())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
MainLoop *main_loop = OS::get_singleton()->get_main_loop();
|
||||
SceneTree *scene_tree = Object::cast_to<SceneTree>(main_loop);
|
||||
|
||||
if (!scene_tree)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
Node *edited_scene = scene_tree->get_edited_scene_root();
|
||||
|
||||
if (!edited_scene)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
Node *script_node = _find_script_node(edited_scene, edited_scene, script);
|
||||
|
||||
if (!script_node)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
if (!script_node->has_node(base_path))
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
Node *path_to = script_node->get_node(base_path);
|
||||
|
||||
|
|
@ -485,7 +485,7 @@ public:
|
|||
} else {
|
||||
//yield
|
||||
|
||||
Object *object = NULL;
|
||||
Object *object = nullptr;
|
||||
|
||||
switch (call_mode) {
|
||||
case VisualScriptYieldSignal::CALL_MODE_SELF: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue