X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/cf0d125a496f82b6831925b514bc5b40717ee9ca..d9fabc892aa327eabb9cae3e2fa7f5f330077220:/deployment.cpp?ds=sidebyside diff --git a/deployment.cpp b/deployment.cpp index bbb47e5..0a5db8c 100644 --- a/deployment.cpp +++ b/deployment.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include #include #include @@ -51,8 +50,6 @@ void deployment_generator::set_link(int host1, int host2) void deployment_generator::distribute_load() { - using std::placeholders::_1; - if (!opt::auto_depl::random_distribution) { set_load(0, opt::auto_depl::load); return; @@ -67,7 +64,7 @@ void deployment_generator::distribute_load() double factor = opt::auto_depl::load / std::accumulate(loads.begin(), loads.end(), 0.0); std::transform(loads.begin(), loads.end(), loads.begin(), - std::bind(std::multiplies(), _1, factor)); + [&factor](double a) { return factor * a; }); if (opt::integer_transfer) { double iload; double residue = 0.0;