aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Henry <nusmuk@users.sourceforge.net>2014-04-16 13:00:59 +0000
committerCyrille Henry <nusmuk@users.sourceforge.net>2014-04-16 13:00:59 +0000
commit42f20832cb998ee5c4fd535ea47f1b0c6cd8c902 (patch)
tree9206f9bd828d8c7de79bf15dde5b84b015570202
parent946d509ee40b5c986004da5193205d490a7f7176 (diff)
debug : delMass failed to relocate few links
svn path=/trunk/externals/pmpd/; revision=17298
-rw-r--r--pmpd2d_core.c2
-rw-r--r--pmpd3d_core.c2
-rw-r--r--pmpd_core.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/pmpd2d_core.c b/pmpd2d_core.c
index 196e2b3..78c7629 100644
--- a/pmpd2d_core.c
+++ b/pmpd2d_core.c
@@ -518,7 +518,7 @@ void pmpd2d_delMass_int(t_pmpd2d *x, int delmass)
{
if (x->link[i].mass1->num > delmass )
{ x->link[i].mass1 = &x->mass[x->link[i].mass1->num-1]; }
- else if (x->link[i].mass2->num > delmass )
+ if (x->link[i].mass2->num > delmass )
{ x->link[i].mass2 = &x->mass[x->link[i].mass2->num-1]; }
}
x->nb_mass--;
diff --git a/pmpd3d_core.c b/pmpd3d_core.c
index f884e44..0ae88e1 100644
--- a/pmpd3d_core.c
+++ b/pmpd3d_core.c
@@ -608,7 +608,7 @@ void pmpd3d_delMass(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv)
// post("mass %d : relocate link %d to mass %d",i, j, i-nb_toremove);
x->link[j].mass1 = &x->mass[i-nb_toremove];
}
- else if (x->link[j].mass2->num == i )
+ if (x->link[j].mass2->num == i )
{
// post("mass %d : relocate link2 %d to mass %d",i, j, i-nb_toremove);
x->link[j].mass2 = &x->mass[i-nb_toremove];
diff --git a/pmpd_core.c b/pmpd_core.c
index 49df4c1..007f5de 100644
--- a/pmpd_core.c
+++ b/pmpd_core.c
@@ -397,7 +397,7 @@ void pmpd_delMass_int(t_pmpd *x, int delmass)
{
if (x->link[i].mass1->num > delmass )
{ x->link[i].mass1 = &x->mass[x->link[i].mass1->num-1]; }
- else if (x->link[i].mass2->num > delmass )
+ if (x->link[i].mass2->num > delmass )
{ x->link[i].mass2 = &x->mass[x->link[i].mass2->num-1]; }
}
x->nb_mass--;