From cda5b0bfe17203b5da261f23bd31f0967522a147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 27 Sep 2018 11:24:41 +0200 Subject: [PATCH] Fix warnings about unused variables [-Wunused-variable] Fixes the following GCC 5 warnings: ``` drivers/gles2/rasterizer_scene_gles2.cpp:1139:15: warning: unused variable 'offset' [-Wunused-variable] drivers/gles2/rasterizer_scene_gles2.cpp:1205:39: warning: unused variable 'multi_mesh' [-Wunused-variable] drivers/gles2/rasterizer_storage_gles2.cpp:359:7: warning: unused variable 'srgb' [-Wunused-variable] drivers/gles2/shader_gles2.cpp:1016:45: warning: unused variable 'texture_hints' [-Wunused-variable] editor/animation_track_editor.cpp:776:9: warning: unused variable 'keys_to' [-Wunused-variable] editor/editor_inspector.cpp:273:7: warning: unused variable 'vs_height' [-Wunused-variable] editor/editor_themes.cpp:202:10: warning: unused variable 'begin_time' [-Wunused-variable] editor/editor_themes.cpp:239:10: warning: unused variable 'end_time' [-Wunused-variable] editor/plugins/animation_blend_tree_editor_plugin.cpp:726:17: warning: unused variable 'an' [-Wunused-variable] editor/plugins/script_text_editor.cpp:1278:8: warning: unused variable 'fold_state' [-Wunused-variable] main/main.cpp:132:13: warning: 'use_vsync' defined but not used [-Wunused-variable] modules/cvtt/image_compress_cvtt.cpp:231:8: warning: unused variable 'y_end' [-Wunused-variable] modules/cvtt/image_compress_cvtt.cpp:311:6: warning: unused variable 'shift' [-Wunused-variable] modules/gdscript/gdscript_editor.cpp:58:7: warning: unused variable 'th' [-Wunused-variable] modules/gridmap/grid_map.cpp:1084:6: warning: unused variable 'ofs' [-Wunused-variable] modules/theora/video_stream_theora.cpp:442:9: warning: unused variable 'tr' [-Wunused-variable] modules/visual_script/visual_script_editor.cpp:2606:6: warning: unused variable 'count' [-Wunused-variable] modules/visual_script/visual_script_editor.cpp:2829:6: warning: unused variable 'seq_count' [-Wunused-variable] modules/visual_script/visual_script_editor.cpp:2844:24: warning: unused variable 'vnode_function' [-Wunused-variable] modules/websocket/lws_peer.cpp:122:12: warning: unused variable 'peer_data' [-Wunused-variable] modules/websocket/lws_peer.cpp:135:12: warning: unused variable 'peer_data' [-Wunused-variable] modules/websocket/lws_peer.cpp:63:12: warning: unused variable 'peer_data' [-Wunused-variable] modules/websocket/lws_peer.cpp:91:12: warning: unused variable 'peer_data' [-Wunused-variable] platform/android/export/export.cpp:763:16: warning: unused variable 'node_size' [-Wunused-variable] scene/gui/rich_text_label.cpp:850:10: warning: unused variable 'x_ofs' [-Wunused-variable] scene/gui/text_edit.cpp:653:8: warning: unused variable 'tab_w' [-Wunused-variable] scene/resources/bit_mask.cpp:186:6: warning: unused variable 'i' [-Wunused-variable] scene/resources/mesh.cpp:549:20: warning: '_array_name' defined but not used [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:107:10: warning: unused variable 'v2' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:108:10: warning: unused variable 'v3' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:109:10: warning: unused variable 'v4' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:110:10: warning: unused variable 'v5' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:111:10: warning: unused variable 'v0n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:112:10: warning: unused variable 'v1n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:113:10: warning: unused variable 'v2n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:114:10: warning: unused variable 'v3n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:115:10: warning: unused variable 'v4n' [-Wunused-variable] servers/audio/audio_rb_resampler.cpp:116:10: warning: unused variable 'v5n' [-Wunused-variable] servers/visual/default_mouse_cursor.xpm:2:21: warning: 'default_mouse_cursor_xpm' defined but not used [-Wunused-variable] ``` --- drivers/gles2/rasterizer_scene_gles2.cpp | 3 -- drivers/gles2/rasterizer_storage_gles2.cpp | 1 - drivers/gles2/shader_gles2.cpp | 2 -- editor/animation_track_editor.cpp | 4 +-- editor/editor_inspector.cpp | 5 --- editor/editor_themes.cpp | 5 --- .../animation_blend_tree_editor_plugin.cpp | 13 -------- .../animation_blend_tree_editor_plugin.h | 2 -- editor/plugins/script_text_editor.cpp | 1 - main/main.cpp | 1 - modules/cvtt/image_compress_cvtt.cpp | 3 -- modules/gdscript/gdscript_editor.cpp | 3 -- modules/gridmap/grid_map.cpp | 33 +++++-------------- modules/theora/video_stream_theora.cpp | 2 +- .../visual_script/visual_script_editor.cpp | 9 +---- modules/websocket/lws_peer.cpp | 6 +--- platform/android/export/export.cpp | 1 - scene/gui/rich_text_label.cpp | 2 -- scene/gui/text_edit.cpp | 2 -- scene/resources/bit_mask.cpp | 1 - scene/resources/mesh.cpp | 13 -------- servers/audio/audio_rb_resampler.cpp | 11 +++++++ servers/visual/default_mouse_cursor.xpm | 23 ------------- servers/visual/visual_server_raster.cpp | 1 - 24 files changed, 23 insertions(+), 124 deletions(-) delete mode 100644 servers/visual/default_mouse_cursor.xpm diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp index 56605a9fe51f..2007d11b9872 100644 --- a/drivers/gles2/rasterizer_scene_gles2.cpp +++ b/drivers/gles2/rasterizer_scene_gles2.cpp @@ -1136,8 +1136,6 @@ void RasterizerSceneGLES2::_setup_geometry(RenderList::Element *p_element, Raste bone_weight[3] = (weight_ptr[3] / (float)0xFFFF); } - size_t offset = i * 12; - Transform transform; Transform bone_transforms[4] = { @@ -1202,7 +1200,6 @@ void RasterizerSceneGLES2::_setup_geometry(RenderList::Element *p_element, Raste } break; case VS::INSTANCE_MULTIMESH: { - RasterizerStorageGLES2::MultiMesh *multi_mesh = static_cast(p_element->owner); RasterizerStorageGLES2::Surface *s = static_cast(p_element->geometry); glBindBuffer(GL_ARRAY_BUFFER, s->vertex_id); diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index adf07c2e4f8a..059c334b94ab 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -356,7 +356,6 @@ void RasterizerStorageGLES2::texture_allocate(RID p_texture, int p_width, int p_ GLenum type; bool compressed = false; - bool srgb = false; if (p_flags & VS::TEXTURE_FLAG_USED_FOR_STREAMING) { p_flags &= ~VS::TEXTURE_FLAG_MIPMAPS; // no mipies for video diff --git a/drivers/gles2/shader_gles2.cpp b/drivers/gles2/shader_gles2.cpp index 216c911a6cb2..5f4a3fd01cbc 100644 --- a/drivers/gles2/shader_gles2.cpp +++ b/drivers/gles2/shader_gles2.cpp @@ -1013,8 +1013,6 @@ void ShaderGLES2::use_material(void *p_material) { int tc = material->textures.size(); Pair *textures = material->textures.ptrw(); - ShaderLanguage::ShaderNode::Uniform::Hint *texture_hints = material->shader->texture_hints.ptrw(); - for (int i = 0; i < tc; i++) { Pair > value; diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 6c68648bc091..77be5614778e 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "animation_track_editor.h" + #include "animation_track_editor_plugins.h" #include "core/os/keyboard.h" #include "editor/animation_bezier_editor.h" @@ -772,9 +773,6 @@ void AnimationTimelineEdit::_notification(int p_what) { hsize_rect = Rect2(get_name_limit() - hsize_icon->get_width() - 2 * EDSCALE, (get_size().height - hsize_icon->get_height()) / 2, hsize_icon->get_width(), hsize_icon->get_height()); draw_texture(hsize_icon, hsize_rect.position); - float keys_from = get_value(); - float keys_to = keys_from + zoomw / scale; - { float time_min = 0; float time_max = animation->get_length(); diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 36c310284065..49d9dca70138 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -267,11 +267,6 @@ void EditorProperty::_notification(int p_what) { } else { keying_rect = Rect2(); } - - //int vs = get_constant("vseparation", "Tree"); - Color guide_color = get_color("guide_color", "Tree"); - int vs_height = get_size().height; // vs / 2; - // draw_line(Point2(0, vs_height), Point2(get_size().width, vs_height), guide_color); } } diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 6dfd5ef57398..888117d90e5a 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -36,7 +36,6 @@ #include "editor_scale.h" #include "editor_settings.h" #include "modules/svg/image_loader_svg.h" -#include "time.h" static Ref make_stylebox(Ref p_texture, float p_left, float p_top, float p_right, float p_botton, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_botton = -1, bool p_draw_center = true) { Ref style(memnew(StyleBoxTexture)); @@ -199,8 +198,6 @@ void editor_register_and_generate_icons(Ref p_theme, bool p_dark_theme = exceptions.push_back("StatusWarning"); exceptions.push_back("NodeWarning"); - clock_t begin_time = clock(); - ImageLoaderSVG::set_convert_colors(&dark_icon_color_dictionary); // generate icons @@ -235,8 +232,6 @@ void editor_register_and_generate_icons(Ref p_theme, bool p_dark_theme = } ImageLoaderSVG::set_convert_colors(NULL); - - clock_t end_time = clock(); #else print_line("SVG support disabled, editor icons won't be rendered."); #endif diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index 19d5243776de..205458fb1d86 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -131,10 +131,6 @@ void AnimationNodeBlendTreeEditor::_update_graph() { Ref agnode = blend_tree->get_node(E->get()); - if (!agnode->is_connected("changed", this, "_node_changed")) { - agnode->connect("changed", this, "_node_changed", varray(agnode->get_instance_id()), CONNECT_DEFERRED); - } - node->set_offset(blend_tree->get_node_position(E->get()) * EDSCALE); node->set_title(agnode->get_caption()); @@ -721,14 +717,6 @@ void AnimationNodeBlendTreeEditor::_scroll_changed(const Vector2 &p_scroll) { updating = false; } -void AnimationNodeBlendTreeEditor::_node_changed(ObjectID p_node) { - - AnimationNode *an = Object::cast_to(ObjectDB::get_instance(p_node)); - //if (an && an->get_parent() == blend_tree) { - _update_graph(); - //} -} - void AnimationNodeBlendTreeEditor::_bind_methods() { ClassDB::bind_method("_update_graph", &AnimationNodeBlendTreeEditor::_update_graph); @@ -746,7 +734,6 @@ void AnimationNodeBlendTreeEditor::_bind_methods() { ClassDB::bind_method("_update_filters", &AnimationNodeBlendTreeEditor::_update_filters); ClassDB::bind_method("_filter_edited", &AnimationNodeBlendTreeEditor::_filter_edited); ClassDB::bind_method("_filter_toggled", &AnimationNodeBlendTreeEditor::_filter_toggled); - ClassDB::bind_method("_node_changed", &AnimationNodeBlendTreeEditor::_node_changed); ClassDB::bind_method("_removed_from_graph", &AnimationNodeBlendTreeEditor::_removed_from_graph); ClassDB::bind_method("_property_changed", &AnimationNodeBlendTreeEditor::_property_changed); ClassDB::bind_method("_file_opened", &AnimationNodeBlendTreeEditor::_file_opened); diff --git a/editor/plugins/animation_blend_tree_editor_plugin.h b/editor/plugins/animation_blend_tree_editor_plugin.h index 9616e8b5da61..e2daefdec61c 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.h +++ b/editor/plugins/animation_blend_tree_editor_plugin.h @@ -104,8 +104,6 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin { void _filter_toggled(); Ref _filter_edit; - void _node_changed(ObjectID p_node); - void _property_changed(const StringName &p_property, const Variant &p_value); void _removed_from_graph(); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 46a6b851315d..23babdf07b76 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -1276,7 +1276,6 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref &ev) { word_at_mouse = tx->get_selection_text(); bool has_color = (word_at_mouse == "Color"); - int fold_state = 0; bool foldable = tx->can_fold(row) || tx->is_folded(row); bool open_docs = false; bool goto_definition = false; diff --git a/main/main.cpp b/main/main.cpp index dac646ba7093..5320d73c7fa0 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -129,7 +129,6 @@ static bool init_always_on_top = false; static bool init_use_custom_pos = false; static Vector2 init_custom_pos; static bool force_lowdpi = false; -static bool use_vsync = true; // Debug diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp index 425d8db1835f..732b9cf73318 100644 --- a/modules/cvtt/image_compress_cvtt.cpp +++ b/modules/cvtt/image_compress_cvtt.cpp @@ -228,8 +228,6 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::CompressS uint8_t *out_bytes = &wb[dst_ofs]; for (int y_start = 0; y_start < h; y_start += 4) { - int y_end = y_start + 4; - CVTTCompressionRowTask row_task; row_task.width = w; row_task.height = h; @@ -308,7 +306,6 @@ void image_decompress_cvtt(Image *p_image) { int target_size = Image::get_image_data_size(w, h, target_format, p_image->has_mipmaps()); int mm_count = p_image->get_mipmap_count(); data.resize(target_size); - int shift = Image::get_format_pixel_rshift(target_format); PoolVector::Write wb = data.write(); diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index a9b641de5082..3194f19aa983 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -33,12 +33,9 @@ #include "core/engine.h" #include "core/global_constants.h" #include "core/os/file_access.h" -#include "editor/editor_settings.h" #include "gdscript_compiler.h" #ifdef TOOLS_ENABLED -#include "core/engine.h" -#include "core/reference.h" #include "editor/editor_file_system.h" #include "editor/editor_settings.h" #endif diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index a480c4183e43..a8fdf8cf1fa4 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -29,37 +29,19 @@ /*************************************************************************/ #include "grid_map.h" -#include "core/message_queue.h" -#include "scene/3d/light.h" -#include "scene/resources/surface_tool.h" -#include "servers/visual_server.h" #include "core/io/marshalls.h" -#include "core/os/os.h" +#include "core/message_queue.h" +#include "scene/3d/light.h" #include "scene/resources/mesh_library.h" +#include "scene/resources/surface_tool.h" #include "scene/scene_string_names.h" +#include "servers/visual_server.h" bool GridMap::_set(const StringName &p_name, const Variant &p_value) { String name = p_name; - /* } else if (name=="cells") { - PoolVector cells = p_value; - int amount=cells.size(); - PoolVector::Read r = cells.read(); - ERR_FAIL_COND_V(amount&1,false); // not even - cell_map.clear(); - for(int i=0;i, Ref > >::Element *E = surface_map.front(); E; E = E->next()) { Ref mesh; diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index d9677b505ca6..d72d74cf7936 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -439,7 +439,7 @@ void VideoStreamPlaybackTheora::update(float p_delta) { } } - int tr = vorbis_synthesis_read(&vd, ret - to_read); + vorbis_synthesis_read(&vd, ret - to_read); audio_frames_wrote += ret - to_read; diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 4736556d6a07..f4e7d9831aa9 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -2603,7 +2603,6 @@ void VisualScriptEditor::connect_data(Ref vnode_old, Ref= value_count) { port = 0; } - int count = vnode_old->get_output_value_port_count() + vnode_old->get_output_sequence_port_count(); undo_redo->add_do_method(script.ptr(), "data_connect", edited_func, port_action_node, port, new_id, 0); undo_redo->add_undo_method(script.ptr(), "data_disconnect", edited_func, port_action_node, port, new_id, 0); undo_redo->commit_action(); @@ -2826,7 +2825,6 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text, const Stri } void VisualScriptEditor::connect_seq(Ref vnode_old, Ref vnode_new, int new_id) { - int seq_count = vnode_old->get_output_sequence_port_count(); VisualScriptOperator *vnode_operator = Object::cast_to(vnode_new.ptr()); if (vnode_operator != NULL && vnode_operator->has_input_sequence_port() == false) { return; @@ -2841,7 +2839,7 @@ void VisualScriptEditor::connect_seq(Ref vnode_old, Refhas_input_sequence_port() == false) { return; } - VisualScriptFunction *vnode_function = Object::cast_to(vnode_old.ptr()); + undo_redo->create_action(TTR("Connect Node Sequence")); int pass_port = -vnode_old->get_output_sequence_port_count() + 1; int return_port = port_action_output - 1; @@ -3367,11 +3365,6 @@ void VisualScriptEditor::_member_option(int p_option) { undo_redo->add_undo_method(script.ptr(), "data_connect", name, E->get().from_node, E->get().from_port, E->get().to_node, E->get().to_port); } - /* - for(int i=0;ifunction_get_argument_count(name);i++) { - undo_redo->add_undo_method(script.ptr(),"function_add_argument",name,script->function_get_argument_name(name,i),script->function_get_argument_type(name,i)); - } - */ undo_redo->add_do_method(this, "_update_members"); undo_redo->add_undo_method(this, "_update_members"); undo_redo->add_do_method(this, "_update_graph"); diff --git a/modules/websocket/lws_peer.cpp b/modules/websocket/lws_peer.cpp index 245b28b608bc..2f022bcfc9c9 100644 --- a/modules/websocket/lws_peer.cpp +++ b/modules/websocket/lws_peer.cpp @@ -30,6 +30,7 @@ #ifndef JAVASCRIPT_ENABLED #include "lws_peer.h" + #include "core/io/ip.h" // Needed for socket_helpers on Android at least. UNIXes has it, just include if not windows @@ -60,7 +61,6 @@ Error LWSPeer::read_wsi(void *in, size_t len) { ERR_FAIL_COND_V(!is_connected_to_host(), FAILED); - PeerData *peer_data = (PeerData *)(lws_wsi_user(wsi)); uint32_t size = in_size; uint8_t is_string = lws_frame_is_binary(wsi) ? 0 : 1; @@ -88,7 +88,6 @@ Error LWSPeer::write_wsi() { ERR_FAIL_COND_V(!is_connected_to_host(), FAILED); - PeerData *peer_data = (PeerData *)(lws_wsi_user(wsi)); PoolVector tmp; int left = rbw.data_left(); uint32_t to_write = 0; @@ -119,7 +118,6 @@ Error LWSPeer::put_packet(const uint8_t *p_buffer, int p_buffer_size) { ERR_FAIL_COND_V(!is_connected_to_host(), FAILED); - PeerData *peer_data = (PeerData *)lws_wsi_user(wsi); rbw.write((uint8_t *)&p_buffer_size, 4); rbw.write(p_buffer, MIN(p_buffer_size, rbw.space_left())); out_count++; @@ -132,8 +130,6 @@ Error LWSPeer::get_packet(const uint8_t **r_buffer, int &r_buffer_size) { ERR_FAIL_COND_V(!is_connected_to_host(), FAILED); - PeerData *peer_data = (PeerData *)lws_wsi_user(wsi); - if (in_count == 0) return ERR_UNAVAILABLE; diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 4fba811cc2b3..e74693893d7c 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -760,7 +760,6 @@ class EditorExportAndroid : public EditorExportPlatform { // save manifest ending so we can restore it Vector manifest_end; uint32_t manifest_cur_size = p_manifest.size(); - uint32_t node_size = size; manifest_end.resize(p_manifest.size() - ofs); memcpy(manifest_end.ptrw(), &p_manifest[ofs], manifest_end.size()); diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index d8c312397d2c..b085280b9646 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -847,8 +847,6 @@ void RichTextLabel::_notification(int p_what) { bool use_outline = get_constant("shadow_as_outline"); Point2 shadow_ofs(get_constant("shadow_offset_x"), get_constant("shadow_offset_y")); - float x_ofs = 0; - visible_line_count = 0; while (y < size.height && from_line < main->lines.size()) { diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index a9566d9387b8..e9ac2ab793cd 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -650,8 +650,6 @@ void TextEdit::_notification(int p_what) { int visible_rows = get_visible_rows() + 1; - int tab_w = cache.font->get_char_size(' ').width * indent_size; - Color color = cache.font_color; color.a *= readonly_alpha; diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp index d670161afd44..56b236d03bbe 100644 --- a/scene/resources/bit_mask.cpp +++ b/scene/resources/bit_mask.cpp @@ -183,7 +183,6 @@ Vector BitMap::_march_square(const Rect2i &rect, const Point2i &start) unsigned int count = 0; Set case9s; Set case6s; - int i; Vector _points; do { int sv = 0; diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 6426689397b1..fa87623e38fb 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -546,19 +546,6 @@ void Mesh::clear_cache() const { Mesh::Mesh() { } -static const char *_array_name[] = { - "vertex_array", - "normal_array", - "tangent_array", - "color_array", - "tex_uv_array", - "tex_uv2_array", - "bone_array", - "weights_array", - "index_array", - NULL -}; - static const ArrayMesh::ArrayType _array_types[] = { ArrayMesh::ARRAY_VERTEX, diff --git a/servers/audio/audio_rb_resampler.cpp b/servers/audio/audio_rb_resampler.cpp index 38c00f610654..84a87de2e2f4 100644 --- a/servers/audio/audio_rb_resampler.cpp +++ b/servers/audio/audio_rb_resampler.cpp @@ -82,19 +82,28 @@ uint32_t AudioRBResampler::_resample(AudioFrame *p_dest, int p_todo, int32_t p_i // For now, channels higher than stereo are almost ignored if (C == 4) { + // FIXME: v2 and v3 are not being used (thus were commented out to prevent + // compilation warnings, but they should likely be uncommented *and* used). + // See also C == 6 with similar issues. float v0 = rb[(pos << 2) + 0]; float v1 = rb[(pos << 2) + 1]; + /* float v2 = rb[(pos << 2) + 2]; float v3 = rb[(pos << 2) + 3]; + */ float v0n = rb[(pos_next << 2) + 0]; float v1n = rb[(pos_next << 2) + 1]; + /* float v2n = rb[(pos_next << 2) + 2]; float v3n = rb[(pos_next << 2) + 3]; + */ v0 += (v0n - v0) * frac; v1 += (v1n - v1) * frac; + /* v2 += (v2n - v2) * frac; v3 += (v3n - v3) * frac; + */ p_dest[i] = AudioFrame(v0, v1); } @@ -104,6 +113,7 @@ uint32_t AudioRBResampler::_resample(AudioFrame *p_dest, int p_todo, int32_t p_i // should be done as for C == 2 (C == 4 also has some unused assignments). float v0 = rb[(pos * 6) + 0]; float v1 = rb[(pos * 6) + 1]; + /* float v2 = rb[(pos * 6) + 2]; float v3 = rb[(pos * 6) + 3]; float v4 = rb[(pos * 6) + 4]; @@ -114,6 +124,7 @@ uint32_t AudioRBResampler::_resample(AudioFrame *p_dest, int p_todo, int32_t p_i float v3n = rb[(pos_next * 6) + 3]; float v4n = rb[(pos_next * 6) + 4]; float v5n = rb[(pos_next * 6) + 5]; + */ p_dest[i] = AudioFrame(v0, v1); } diff --git a/servers/visual/default_mouse_cursor.xpm b/servers/visual/default_mouse_cursor.xpm deleted file mode 100644 index 37d437dd15a9..000000000000 --- a/servers/visual/default_mouse_cursor.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static const char * default_mouse_cursor_xpm[] = { -"16 16 4 1", -" c None", -". c #000000", -"+ c #FF00FF", -"@ c #FFFFFF", -"...+++++++++++++", -".@...+++++++++++", -".@@@...+++++++++", -".@@@@@....++++++", -".@@@@@@@@...++++", -".@@@@@@@@@@...++", -".@@@@@@@@@@@@..+", -".@@@@@@@@@@@@@..", -".@@@@@@@@@@@@..+", -".@@@@@@@@@@@..++", -".@@@@@@@@@...+++", -".@@@.....@@..+++", -".....+++.@@@..++", -"++++++++..@@@..+", -"+++++++++..@@@.+", -"++++++++++.....+"}; diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index ea63ae5013e6..6e41197e213e 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -34,7 +34,6 @@ #include "core/os/os.h" #include "core/project_settings.h" #include "core/sort.h" -#include "default_mouse_cursor.xpm" #include "visual_server_canvas.h" #include "visual_server_global.h" #include "visual_server_scene.h"