X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/416eebc1f127894d201c28c05c4900eb660d657c..d896265a56dbf34328e32566da1932835d840d27:/src/surf/network_constant.cpp diff --git a/src/surf/network_constant.cpp b/src/surf/network_constant.cpp index b3cd6f9c8a..06001baa61 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; @@ -145,12 +141,10 @@ void NetworkConstantAction::cancel() return; } -#ifdef HAVE_TRACING void NetworkConstantAction::setCategory(const char */*category*/) { //ignore completely the categories in constant model, they are not traced } -#endif void NetworkConstantAction::suspend() {