summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-10-28 01:39:28 +0200
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-11-21 08:43:36 +0100
commit28af8707505a6bd33a83a3fbaa88bac88d9c414b (patch)
tree6d6022c854f04caf73271a4d36ad5bc40782f08c /editor/plugins
parentdce1602edacd8ad96a70f29e4f524d7b7c231e3f (diff)
Code simplifications found by cppcheck
They are based on: - Boolean arithmetic simplifications - setting variables that are not accessed - constant variables
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/bone_map_editor_plugin.cpp2
-rw-r--r--editor/plugins/tiles/tile_data_editors.cpp3
2 files changed, 0 insertions, 5 deletions
diff --git a/editor/plugins/bone_map_editor_plugin.cpp b/editor/plugins/bone_map_editor_plugin.cpp
index 22c30c9af8..9ceedb18b3 100644
--- a/editor/plugins/bone_map_editor_plugin.cpp
+++ b/editor/plugins/bone_map_editor_plugin.cpp
@@ -742,7 +742,6 @@ void BoneMapper::auto_mapping_process(Ref<BoneMap> &p_bone_map) {
} else {
p_bone_map->_set_skeleton_bone_name("LeftEye", skeleton->get_bone_name(bone_idx));
}
- bone_idx = -1;
bone_idx = search_bone_by_name(skeleton, picklist, BONE_SEGREGATION_RIGHT, neck_or_head);
if (bone_idx == -1) {
@@ -750,7 +749,6 @@ void BoneMapper::auto_mapping_process(Ref<BoneMap> &p_bone_map) {
} else {
p_bone_map->_set_skeleton_bone_name("RightEye", skeleton->get_bone_name(bone_idx));
}
- bone_idx = -1;
picklist.clear();
// 4-2. Guess Jaw
diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp
index ce176e3a99..42eceb82ab 100644
--- a/editor/plugins/tiles/tile_data_editors.cpp
+++ b/editor/plugins/tiles/tile_data_editors.cpp
@@ -2481,9 +2481,6 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi
if (terrain_set == -1 || !tile_data || tile_data->get_terrain_set() != terrain_set) {
// Paint terrain sets.
- if (mb->get_button_index() == MouseButton::RIGHT) {
- terrain_set = -1;
- }
drag_type = DRAG_TYPE_PAINT_TERRAIN_SET;
drag_modified.clear();
drag_painted_value = int(dummy_object->get("terrain_set"));