Remove assignment and declarations in if statements

After discussing with @reduz and @akien-mga it was decided that we do
not allow assignments or declarations in if statements. This PR removes
the instances of this I could find by automated means.
This commit is contained in:
Hein-Pieter van Braam
2017-09-06 23:50:18 +02:00
parent d1cb73b47a
commit 8230bf0a2f
17 changed files with 87 additions and 49 deletions

View File

@@ -50,7 +50,8 @@ void CollisionShape::make_convex_from_brothers() {
for (int i = 0; i < p->get_child_count(); i++) {
Node *n = p->get_child(i);
if (MeshInstance *mi = Object::cast_to<MeshInstance>(n)) {
MeshInstance *mi = Object::cast_to<MeshInstance>(n);
if (mi) {
Ref<Mesh> m = mi->get_mesh();
if (m.is_valid()) {