Fix -Wunused-but-set-variable warnings from Emscripten 3.1.20

This commit is contained in:
Rémi Verschelde 2022-11-04 11:36:13 +01:00
parent 191c8ed12f
commit f475c91081
No known key found for this signature in database
GPG key ID: C3336907360768E1
6 changed files with 1 additions and 21 deletions

View file

@ -29,6 +29,7 @@
/*************************************************************************/
#include "editor/action_map_editor.h"
#include "editor/editor_scale.h"
#include "editor/event_listener_line_edit.h"
#include "editor/input_event_configuration_dialog.h"
@ -395,15 +396,9 @@ void ActionMapEditor::update_action_list(const Vector<ActionInfo> &p_action_info
action_tree->clear();
TreeItem *root = action_tree->create_item();
int uneditable_count = 0;
for (int i = 0; i < actions_cache.size(); i++) {
ActionInfo action_info = actions_cache[i];
if (!action_info.editable) {
uneditable_count++;
}
const Array events = action_info.action["events"];
if (!_should_display_action(action_info.name, events)) {
continue;

View file

@ -1045,7 +1045,6 @@ void EditorPropertyLayersGrid::_notification(int p_what) {
const int vofs = (grid_size.height - h) / 2;
int layer_index = 0;
int block_index = 0;
Point2 arrow_pos;
@ -1112,8 +1111,6 @@ void EditorPropertyLayersGrid::_notification(int p_what) {
break;
}
}
++block_index;
}
if ((expansion_rows != prev_expansion_rows) && expanded) {

View file

@ -1276,14 +1276,12 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<
} break;
}
int idx = 0;
for (const Ref<Shape3D> &E : shapes) {
CollisionShape3D *cshape = memnew(CollisionShape3D);
cshape->set_shape(E);
base->add_child(cshape, true);
cshape->set_owner(base->get_owner());
idx++;
}
}
}

View file

@ -2068,12 +2068,9 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
}
}
int index = 0;
for (CanvasItem *ci : drag_selection) {
Transform2D xform = ci->get_global_transform_with_canvas().affine_inverse() * ci->get_transform();
ci->_edit_set_position(ci->_edit_get_position() + xform.xform(new_pos) - xform.xform(previous_pos));
index++;
}
return true;
}
@ -2191,12 +2188,9 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
new_pos = previous_pos + (drag_to - drag_from);
}
int index = 0;
for (CanvasItem *ci : drag_selection) {
Transform2D xform = ci->get_global_transform_with_canvas().affine_inverse() * ci->get_transform();
ci->_edit_set_position(ci->_edit_get_position() + xform.xform(new_pos) - xform.xform(previous_pos));
index++;
}
}
return true;

View file

@ -546,7 +546,6 @@ private:
Vector<String> failed_files;
int idx = 0;
while (ret == UNZ_OK) {
//get filename
unz_file_info info;
@ -585,7 +584,6 @@ private:
}
}
idx++;
ret = unzGoToNextFile(pkg);
}

View file

@ -275,7 +275,6 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must
bool found = false;
bool match = false;
int index = 0;
for (const String &E : extensions) {
if (E.nocasecmp_to(extension) == 0) {
found = true;
@ -284,7 +283,6 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must
}
break;
}
index++;
}
if (!found) {