From: scastelli Date: Wed, 4 Jun 2014 13:28:54 +0000 (+0200) Subject: Is seems as right as before, only shorter X-Git-Tag: v3_12~1011 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7e252856ccdd90edd6e9990047b9a167136bee89 Is seems as right as before, only shorter --- diff --git a/src/surf/network_constant.cpp b/src/surf/network_constant.cpp index b3cd6f9c8a..1f17a2c0f3 100644 --- a/src/surf/network_constant.cpp +++ b/src/surf/network_constant.cpp @@ -37,12 +37,8 @@ double NetworkConstantModel::shareResources(double /*now*/) for(ActionList::iterator it(actionSet->begin()), itend(actionSet->end()) ; it != itend ; ++it) { action = static_cast(&*it); - if (action->m_latency > 0) { - if (min < 0) - min = action->m_latency; - else if (action->m_latency < min) - min = action->m_latency; - } + if (action->m_latency > 0 && (min < 0 || action->m_latency < min)) + min = action->m_latency; } return min;