diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 10 | ||||
-rw-r--r-- | main/tests/test_gdscript.cpp | 4 | ||||
-rw-r--r-- | main/tests/test_shader_lang.cpp | 12 |
3 files changed, 13 insertions, 13 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); diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp index b0b7fc8357..55e31a18c3 100644 --- a/main/tests/test_gdscript.cpp +++ b/main/tests/test_gdscript.cpp @@ -1041,10 +1041,10 @@ MainLoop *test(TestType p_type) { } else if (p_type == TEST_BYTECODE) { - Vector<uint8_t> buf = GDScriptTokenizerBuffer::parse_code_string(code); + Vector<uint8_t> buf2 = GDScriptTokenizerBuffer::parse_code_string(code); String dst = test.get_basename() + ".gdc"; FileAccess *fw = FileAccess::open(dst, FileAccess::WRITE); - fw->store_buffer(buf.ptr(), buf.size()); + fw->store_buffer(buf2.ptr(), buf2.size()); memdelete(fw); } diff --git a/main/tests/test_shader_lang.cpp b/main/tests/test_shader_lang.cpp index 8441748cc0..dcb19b7df7 100644 --- a/main/tests/test_shader_lang.cpp +++ b/main/tests/test_shader_lang.cpp @@ -149,11 +149,11 @@ static String dump_node_code(SL::Node *p_node, int p_level) { String header; header = _typestr(fnode->return_type) + " " + fnode->name + "("; - for (int i = 0; i < fnode->arguments.size(); i++) { + for (int j = 0; j < fnode->arguments.size(); j++) { - if (i > 0) + if (j > 0) header += ", "; - header += _prestr(fnode->arguments[i].precision) + _typestr(fnode->arguments[i].type) + " " + fnode->arguments[i].name; + header += _prestr(fnode->arguments[j].precision) + _typestr(fnode->arguments[j].type) + " " + fnode->arguments[j].name; } header += ")\n"; @@ -336,9 +336,9 @@ MainLoop *test() { print_line("Error at line: " + rtos(sl.get_error_line()) + ": " + sl.get_error_text()); return NULL; } else { - String code; - recreate_code(&code, sl.get_shader()); - print_line("code:\n\n" + code); + String code2; + recreate_code(&code2, sl.get_shader()); + print_line("code:\n\n" + code2); } return NULL; |