diff options
author | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2019-01-14 20:04:47 -0200 |
---|---|---|
committer | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2019-01-16 12:59:18 -0200 |
commit | 9c69d7f3392249d26236dcb33bee7de8f283dc28 (patch) | |
tree | 763d38e46df4458c46b9766cee3f273d1f2ac897 /scene/2d | |
parent | 9c1768836f25e780a7ef51a1d18a0a15e0b55e42 (diff) |
Appease some CppCheck warns for files in the "scene" directory
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/polygon_2d.cpp | 3 | ||||
-rw-r--r-- | scene/2d/tile_map.cpp | 5 |
2 files changed, 2 insertions, 6 deletions
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index bfa82fa12e..54b304f851 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -224,15 +224,12 @@ void Polygon2D::_notification(int p_what) { for (int i = 0; i < bone_weights.size(); i++) { if (bone_weights[i].weights.size() != points.size()) { continue; //different number of vertices, sorry not using. - print_line("wrong weight size"); } if (!skeleton_node->has_node(bone_weights[i].path)) { - print_line("no node"); continue; //node does not exist } Bone2D *bone = Object::cast_to<Bone2D>(skeleton_node->get_node(bone_weights[i].path)); if (!bone) { - print_line("no bone"); continue; } diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index cac59bddff..d61296b13f 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -377,13 +377,12 @@ void TileMap::update_dirty_quadrants() { r.size = tile_set->autotile_get_size(c.id); r.position += (r.size + Vector2(spacing, spacing)) * Vector2(c.autotile_coord_x, c.autotile_coord_y); } - Size2 s = tex->get_size(); + Size2 s; if (r == Rect2()) s = tex->get_size(); - else { + else s = r.size; - } Rect2 rect; rect.position = offset.floor(); |