diff options
| author | Rémi Verschelde | 2018-05-01 19:14:07 +0200 |
|---|---|---|
| committer | GitHub | 2018-05-01 19:14:07 +0200 |
| commit | de97339a2d66cc9e3bd9ab77dd4e0c5c6534a869 (patch) | |
| tree | 90a5f1949ce557c33e5f97147d4021c96500dadd /editor/plugins/tile_set_editor_plugin.cpp | |
| parent | c9abe88110abdc51bf520cd9af95e59374f7c0cc (diff) | |
| parent | bf7ca623a65f25cc4ac7a3ca0d6635331ec07c25 (diff) | |
| download | godot-de97339a2d66cc9e3bd9ab77dd4e0c5c6534a869.tar.gz godot-de97339a2d66cc9e3bd9ab77dd4e0c5c6534a869.tar.zst godot-de97339a2d66cc9e3bd9ab77dd4e0c5c6534a869.zip | |
Merge pull request #18291 from akien-mga/coverity-uninitialized-scalar-var
Fix Coverity reports of uninitialized scalar variable
Diffstat (limited to 'editor/plugins/tile_set_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index 7c40eb5c4..385fa24ad 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -806,7 +806,7 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) { Vector2 coord((int)(mb->get_position().x / (spacing + size.x)), (int)(mb->get_position().y / (spacing + size.y))); Vector2 pos(coord.x * (spacing + size.x), coord.y * (spacing + size.y)); pos = mb->get_position() - pos; - uint16_t bit; + uint16_t bit = 0; if (tileset->autotile_get_bitmask_mode(get_current_tile()) == TileSet::BITMASK_2X2) { if (pos.x < size.x / 2) { if (pos.y < size.y / 2) { @@ -869,7 +869,7 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) { Vector2 coord((int)(mm->get_position().x / (spacing + size.x)), (int)(mm->get_position().y / (spacing + size.y))); Vector2 pos(coord.x * (spacing + size.x), coord.y * (spacing + size.y)); pos = mm->get_position() - pos; - uint16_t bit; + uint16_t bit = 0; if (tileset->autotile_get_bitmask_mode(get_current_tile()) == TileSet::BITMASK_2X2) { if (pos.x < size.x / 2) { if (pos.y < size.y / 2) { @@ -1147,7 +1147,7 @@ void TileSetEditor::_on_tool_clicked(int p_tool) { case EDITMODE_COLLISION: { if (!edited_collision_shape.is_null()) { Vector<TileSet::ShapeData> sd = tileset->tile_get_shapes(get_current_tile()); - int index; + int index = -1; for (int i = 0; i < sd.size(); i++) { if (sd[i].shape == edited_collision_shape) { index = i; |
