summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-09-27 12:07:59 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-09-27 16:25:24 +0200
commitd95bbb89227cab293f17f325040084ea780652ab (patch)
tree9b45824fdb2ee7a3d2047e1b93d11861f170a3af /editor/plugins
parentcda5b0bfe17203b5da261f23bd31f0967522a147 (diff)
Fix warnings about set but unused variables [-Wunused-but-set-variable]
Fixes the following GCC 5 warnings: ``` drivers/gles2/rasterizer_canvas_gles2.cpp:814:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:2270:11: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:2673:22: warning: variable 'e' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:715:7: warning: variable 'no_cull' set but not used [-Wunused-but-set-variable] drivers/gles2/shader_gles2.cpp:693:14: warning: variable 'cc' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_canvas_gles3.cpp:1226:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_scene_gles3.cpp:3039:10: warning: variable 'contrib' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_scene_gles3.cpp:4504:32: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable] editor/editor_inspector.cpp:272:9: warning: variable 'guide_color' set but not used [-Wunused-but-set-variable] editor/editor_themes.cpp:1067:14: warning: variable 'alpha3' set but not used [-Wunused-but-set-variable] editor/editor_themes.cpp:263:8: warning: variable 'script_bg_color' set but not used [-Wunused-but-set-variable] editor/plugins/collision_shape_2d_editor_plugin.cpp:326:11: warning: variable 'cpoint' set but not used [-Wunused-but-set-variable] editor/plugins/mesh_editor_plugin.cpp:72:9: warning: variable 'size' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:471:12: warning: variable 'mpos' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:89:8: warning: variable 'basetype_color' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:90:8: warning: variable 'type_color' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:92:8: warning: variable 'string_color' set but not used [-Wunused-but-set-variable] modules/visual_script/visual_script_editor.cpp:2521:7: warning: variable 'seq_connect' set but not used [-Wunused-but-set-variable] platform/android/export/export.cpp:580:12: warning: variable 'styles_count' set but not used [-Wunused-but-set-variable] platform/android/export/export.cpp:584:12: warning: variable 'styles_offset' set but not used [-Wunused-but-set-variable] platform/osx/export/export.cpp:464:9: warning: variable 'zerr' set but not used [-Wunused-but-set-variable] scene/2d/tile_map.cpp:260:10: warning: variable 'tcenter' set but not used [-Wunused-but-set-variable] scene/3d/light.cpp:166:7: warning: variable 'editor_ok' set but not used [-Wunused-but-set-variable] scene/3d/navigation.cpp:566:11: warning: variable 'closest_navmesh' set but not used [-Wunused-but-set-variable] scene/gui/rich_text_label.cpp:869:8: warning: variable 'size' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:705:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:706:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:726:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:727:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable] scene/resources/material.cpp:430:7: warning: variable 'using_world' set but not used [-Wunused-but-set-variable] servers/visual/shader_language.cpp:2026:7: warning: variable 'all_const' set but not used [-Wunused-but-set-variable] servers/visual/visual_server_scene.cpp:1383:28: warning: variable 'z_max_cam' set but not used [-Wunused-but-set-variable] ``` Also fixes two [-Wunused-value] warnings: ``` scene/gui/text_edit.cpp:4405:20: warning: statement has no effect [-Wunused-value] servers/visual/visual_server_scene.cpp:905:48: warning: value computed is not used [-Wunused-value] ``` Some of those are bugs and need further work, they are identified with `// FIXME` comments.
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp1
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp8
-rw-r--r--editor/plugins/shader_editor_plugin.cpp20
3 files changed, 0 insertions, 29 deletions
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index e3f364790a..d1a94f5b49 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -323,7 +323,6 @@ bool CollisionShape2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_e
if (mb.is_valid()) {
Vector2 gpoint = mb->get_position();
- Vector2 cpoint = node->get_global_transform().affine_inverse().xform(canvas_item_editor->snap_point(canvas_item_editor->get_canvas_transform().affine_inverse().xform(mb->get_position())));
if (mb->get_button_index() == BUTTON_LEFT) {
if (mb->is_pressed()) {
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index 7b7e23531a..73a216e96f 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -65,14 +65,6 @@ void MeshEditor::_notification(int p_what) {
first_enter = false;
}
}
-
- if (p_what == NOTIFICATION_DRAW) {
-
- Ref<Texture> checkerboard = get_icon("Checkerboard", "EditorIcons");
- Size2 size = get_size();
-
- //draw_texture_rect(checkerboard, Rect2(Point2(), size), true);
- }
}
void MeshEditor::_update_rotation() {
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index 361271af89..775fca308e 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -86,10 +86,7 @@ void ShaderTextEditor::_load_theme_settings() {
Color search_result_border_color = EDITOR_GET("text_editor/highlighting/search_result_border_color");
Color symbol_color = EDITOR_GET("text_editor/highlighting/symbol_color");
Color keyword_color = EDITOR_GET("text_editor/highlighting/keyword_color");
- Color basetype_color = EDITOR_GET("text_editor/highlighting/base_type_color");
- Color type_color = EDITOR_GET("text_editor/highlighting/engine_type_color");
Color comment_color = EDITOR_GET("text_editor/highlighting/comment_color");
- Color string_color = EDITOR_GET("text_editor/highlighting/string_color");
get_text_edit()->add_color_override("background_color", background_color);
get_text_edit()->add_color_override("completion_background_color", completion_background_color);
@@ -140,26 +137,9 @@ void ShaderTextEditor::_load_theme_settings() {
get_text_edit()->add_keyword_color(E->get(), keyword_color);
}
- //colorize core types
- //Color basetype_color= EDITOR_DEF("text_editor/base_type_color",Color(0.3,0.3,0.0));
-
//colorize comments
get_text_edit()->add_color_region("/*", "*/", comment_color, false);
get_text_edit()->add_color_region("//", "", comment_color, false);
-
- /*//colorize strings
- Color string_color = EDITOR_DEF("text_editor/string_color",Color::hex(0x6b6f00ff));
-
- List<String> strings;
- shader->get_shader_mode()->get_string_delimiters(&strings);
-
- for (List<String>::Element *E=strings.front();E;E=E->next()) {
-
- String string = E->get();
- String beg = string.get_slice(" ",0);
- String end = string.get_slice_count(" ")>1?string.get_slice(" ",1):String();
- get_text_edit()->add_color_region(beg,end,string_color,end=="");
- }*/
}
void ShaderTextEditor::_check_shader_mode() {