yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #11646
[Branch ~yade-pkg/yade/git-trunk] Rev 3536: Drop some if-conditions, which have always constant value.
------------------------------------------------------------
revno: 3536
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Mon 2014-11-17 14:21:30 +0100
message:
Drop some if-conditions, which have always constant value.
modified:
pkg/dem/ViscoelasticCapillarPM.cpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/dem/ViscoelasticCapillarPM.cpp'
--- pkg/dem/ViscoelasticCapillarPM.cpp 2014-11-17 11:34:44 +0000
+++ pkg/dem/ViscoelasticCapillarPM.cpp 2014-11-17 13:21:30 +0000
@@ -566,7 +566,7 @@
Real LiqControl::liqVolBody (id_t id) const {
Scene* scene=Omega::instance().getScene().get();
const BodyContainer& bodies = *scene->bodies;
- if (id >=0 and bodies[id]) {
+ if (bodies[id]) {
if (bodies[id]->state->Vf > 0) {
return bodies[id]->state->Vf + liqVolIterBody(bodies[id]);
} else {
@@ -588,7 +588,7 @@
}
bool LiqControl::addLiqInter(id_t id1, id_t id2, Real liq) {
- if (id1<0 or id2<0 or id1==id2 or liq<=0) return false;
+ if (id1==id2 or liq<=0) return false;
Scene* scene=Omega::instance().getScene().get();
shared_ptr<InteractionContainer>& intrs=scene->interactions;