A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git]
/
src
/
surf
/
network_constant.cpp
diff --git
a/src/surf/network_constant.cpp
b/src/surf/network_constant.cpp
index
c331629
..
1f17a2c
100644
(file)
--- a/
src/surf/network_constant.cpp
+++ b/
src/surf/network_constant.cpp
@@
-24,7
+24,7
@@
void surf_network_model_init_Constant()
sg_platf_host_add_cb(netcste_count_hosts);
sg_platf_host_add_cb(netcste_count_hosts);
- ModelPtr model = s
tatic_cast<ModelPtr>(surf_network_model)
;
+ ModelPtr model = s
urf_network_model
;
xbt_dynar_push(model_list, &model);
}
xbt_dynar_push(model_list, &model);
}
@@
-37,12
+37,8
@@
double NetworkConstantModel::shareResources(double /*now*/)
for(ActionList::iterator it(actionSet->begin()), itend(actionSet->end())
; it != itend ; ++it) {
action = static_cast<NetworkConstantActionPtr>(&*it);
for(ActionList::iterator it(actionSet->begin()), itend(actionSet->end())
; it != itend ; ++it) {
action = static_cast<NetworkConstantActionPtr>(&*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;
}
return min;