diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-02-20 22:24:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-20 22:24:58 +0100 |
commit | 8107fc98b6ceae749b3c10e6f0432e904961867b (patch) | |
tree | 6c0ab829b02aba47ff3dc27b9a14d3c3a0658a3b /main/main.cpp | |
parent | 132e2f458df7a3551a251d68afeccd0362ca6be2 (diff) | |
parent | 8d51618949d5ea8a94e0f504401e8f852a393968 (diff) |
Merge pull request #25853 from marxin/fix-25316-wshadow-local
Add -Wshadow=local to warnings and fix reported issues (#25316).
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/main.cpp b/main/main.cpp index b81a379dbb..ee13a4bacc 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1147,8 +1147,8 @@ Error Main::setup2(Thread::ID p_main_tid_override) { if (boot_logo_path != String()) { boot_logo.instance(); - Error err = ImageLoader::load_image(boot_logo_path, boot_logo); - if (err) + Error load_err = ImageLoader::load_image(boot_logo_path, boot_logo); + if (load_err) ERR_PRINTS("Non-existing or invalid boot splash at: " + boot_logo_path + ". Loading default splash."); } @@ -1548,8 +1548,8 @@ bool Main::start() { Ref<PackedScene> ps = res; n = ps->instance(); } else if (res->is_class("Script")) { - Ref<Script> s = res; - StringName ibt = s->get_instance_base_type(); + Ref<Script> script_res = res; + StringName ibt = script_res->get_instance_base_type(); bool valid_type = ClassDB::is_parent_class(ibt, "Node"); ERR_EXPLAIN("Script does not inherit a Node: " + path); ERR_CONTINUE(!valid_type); @@ -1560,7 +1560,7 @@ bool Main::start() { ERR_CONTINUE(obj == NULL); n = Object::cast_to<Node>(obj); - n->set_script(s.get_ref_ptr()); + n->set_script(script_res.get_ref_ptr()); } ERR_EXPLAIN("Path in autoload not a node or script: " + path); |