X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/0c4a3402a57c61218bf1d1c6d8c31f5c3e1482f9..7725e3d7f34e70c0ba01ddc4e1055e096e72c2c3:/process.cpp diff --git a/process.cpp b/process.cpp index 8b31678..306687f 100644 --- a/process.cpp +++ b/process.cpp @@ -148,8 +148,9 @@ int process::run() double process::sum_of_to_send() const { - using namespace std::tr1; - using namespace std::tr1::placeholders; + using std::tr1::bind; + using std::tr1::placeholders::_1; + using std::tr1::placeholders::_2; return std::accumulate(neigh.begin(), neigh.end(), 0.0, bind(std::plus(), @@ -218,8 +219,8 @@ void process::send1_bookkeeping(neighbor& nb) void process::send() { - using namespace std::tr1; - using namespace std::tr1::placeholders; + using std::tr1::bind; + using std::tr1::placeholders::_1; if (opt::bookkeeping) { std::for_each(neigh.begin(), neigh.end(), @@ -283,8 +284,8 @@ void process::finalize1(neighbor& nb) void process::finalize() { - using namespace std::tr1; - using namespace std::tr1::placeholders; + using std::tr1::bind; + using std::tr1::placeholders::_1; finalizing = true; total_load_running -= load; @@ -303,8 +304,8 @@ void process::finalize() #define print_loads_generic(vec, verbose, logp, cat) \ if (_XBT_LOG_ISENABLEDV((*cat), logp)) { \ - using namespace std::tr1; \ - using namespace std::tr1::placeholders; \ + using std::tr1::bind; \ + using std::tr1::placeholders::_1; \ XCLOG0(cat, logp, "Neighbor loads:"); \ std::for_each(vec.begin(), vec.end(), \ bind(&neighbor::print, _1, verbose, logp, cat)); \