diff options
-rw-r--r-- | editor/editor_themes.cpp | 2 | ||||
-rw-r--r-- | main/tests/test_shader_lang.cpp | 2 | ||||
-rw-r--r-- | modules/gdscript/gd_function.h | 3 | ||||
-rw-r--r-- | modules/gdscript/gd_script.cpp | 3 | ||||
-rw-r--r-- | modules/svg/image_loader_svg.cpp | 7 | ||||
-rw-r--r-- | modules/visual_script/visual_script_expression.cpp | 1 | ||||
-rw-r--r-- | platform/android/godot_android.cpp | 1 | ||||
-rw-r--r-- | scene/gui/control.cpp | 2 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 3 | ||||
-rw-r--r-- | scene/resources/style_box.cpp | 4 |
10 files changed, 12 insertions, 16 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 4f1e6c1771..f628a23d5f 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -411,6 +411,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("SceneTabFG", "EditorStyles", make_flat_stylebox(title_color_hl, 10, 5, 10, 5)); theme->set_stylebox("SceneTabBG", "EditorStyles", make_empty_stylebox(6, 5, 6, 5)); theme->set_icon("close", "Tabs", theme->get_icon("GuiClose", "EditorIcons")); + theme->set_stylebox("button_pressed", "Tabs", style_menu); + theme->set_stylebox("button", "Tabs", style_menu); // Separators (no separators) theme->set_stylebox("separator", "HSeparator", make_line_stylebox(separator_color, border_width)); diff --git a/main/tests/test_shader_lang.cpp b/main/tests/test_shader_lang.cpp index dc581a71e2..f9516dad99 100644 --- a/main/tests/test_shader_lang.cpp +++ b/main/tests/test_shader_lang.cpp @@ -56,8 +56,6 @@ static String _mktab(int p_level) { static String _typestr(SL::DataType p_type) { return ShaderLanguage::get_datatype_name(p_type); - - return ""; } static String _prestr(SL::DataPrecision p_pres) { diff --git a/modules/gdscript/gd_function.h b/modules/gdscript/gd_function.h index 6d20b19777..661de0acce 100644 --- a/modules/gdscript/gd_function.h +++ b/modules/gdscript/gd_function.h @@ -210,8 +210,9 @@ public: #ifdef TOOLS_ENABLED ERR_FAIL_INDEX_V(p_idx, arg_names.size(), StringName()); return arg_names[p_idx]; -#endif +#else return StringName(); +#endif } Variant get_default_argument(int p_idx) const { ERR_FAIL_INDEX_V(p_idx, default_arguments.size(), Variant()); diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 2d06c0f5d2..23201dc1b0 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -559,8 +559,9 @@ bool GDScript::_update_exports() { return changed; -#endif +#else return false; +#endif } void GDScript::update_exports() { diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp index 46931fb0f6..c74188d9ea 100644 --- a/modules/svg/image_loader_svg.cpp +++ b/modules/svg/image_loader_svg.cpp @@ -82,9 +82,9 @@ Error ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, const char *s size_t str_len = strlen(svg_str); PoolVector<uint8_t> src_data; - src_data.resize(str_len); + src_data.resize(str_len + 1); PoolVector<uint8_t>::Write src_w = src_data.write(); - memcpy(src_w.ptr(), svg_str, str_len); + memcpy(src_w.ptr(), svg_str, str_len + 1); return _create_image(p_image, &src_data, p_scale, upsample); } @@ -93,9 +93,10 @@ Error ImageLoaderSVG::load_image(Ref<Image> p_image, FileAccess *f, bool p_force uint32_t size = f->get_len(); PoolVector<uint8_t> src_image; - src_image.resize(size); + src_image.resize(size + 1); PoolVector<uint8_t>::Write src_w = src_image.write(); f->get_buffer(src_w.ptr(), size); + src_w.ptr()[size] = '\0'; return _create_image(p_image, &src_image, p_scale, 1.0); } diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp index 78b70934c0..25c2ebd6d2 100644 --- a/modules/visual_script/visual_script_expression.cpp +++ b/modules/visual_script/visual_script_expression.cpp @@ -585,7 +585,6 @@ Error VisualScriptExpression::_get_token(Token &r_token) { r_token.type = TK_BASIC_TYPE; r_token.value = i; return OK; - break; } } diff --git a/platform/android/godot_android.cpp b/platform/android/godot_android.cpp index 5933b83d06..2dd2c0532a 100644 --- a/platform/android/godot_android.cpp +++ b/platform/android/godot_android.cpp @@ -833,7 +833,6 @@ void android_main(struct android_app *app) { if (engine.requested_quit) { engine_term_display(&engine); exit(0); - return; } // LOGI("end\n"); diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 6a3ef66e0a..36fc9a6b3a 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -1839,8 +1839,6 @@ Control *Control::find_prev_valid_focus() const { } return NULL; - - return NULL; } Control::FocusMode Control::get_focus_mode() const { diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index f15fb71f87..68529ae255 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -3656,9 +3656,6 @@ void TextEdit::cut() { void TextEdit::copy() { - if (!selection.active) - return; - if (!selection.active) { String clipboard = _base_get_text(cursor.line, 0, cursor.line, text[cursor.line].length()); OS::get_singleton()->set_clipboard(clipboard); diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index 3100aab8ad..7b2a9ffbc2 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -273,8 +273,8 @@ void StyleBoxTexture::_bind_methods() { ClassDB::bind_method(D_METHOD("get_margin_size", "margin"), &StyleBoxTexture::get_margin_size); ClassDB::bind_method(D_METHOD("set_expand_margin_size", "margin", "size"), &StyleBoxTexture::set_expand_margin_size); - ClassDB::bind_method(D_METHOD("set_expand_margin_all", "size"), &StyleBoxFlat::set_expand_margin_size_all); - ClassDB::bind_method(D_METHOD("set_expand_margin_individual", "size_left", "size_top", "size_right", "size_bottom"), &StyleBoxFlat::set_expand_margin_size_individual); + ClassDB::bind_method(D_METHOD("set_expand_margin_all", "size"), &StyleBoxTexture::set_expand_margin_size_all); + ClassDB::bind_method(D_METHOD("set_expand_margin_individual", "size_left", "size_top", "size_right", "size_bottom"), &StyleBoxTexture::set_expand_margin_size_individual); ClassDB::bind_method(D_METHOD("get_expand_margin_size", "margin"), &StyleBoxTexture::get_expand_margin_size); ClassDB::bind_method(D_METHOD("set_region_rect", "region"), &StyleBoxTexture::set_region_rect); |