]> AND Private Git Repository - loba.git/commitdiff
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Do not import full std::tr1 namespace.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 22 Dec 2010 08:01:09 +0000 (09:01 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 5 Jan 2011 07:44:53 +0000 (08:44 +0100)
communicator.cpp
process.cpp

index 1570b10148a02dbb2fdfa7a78444d2cae1309b6a..f3e6bf9fae1eddd27ec2f25e11977dfd727d15c4 100644 (file)
@@ -115,8 +115,8 @@ bool communicator::recv(message*& msg, m_host_t& from, bool wait)
 
 void communicator::flush(bool wait)
 {
 
 void communicator::flush(bool wait)
 {
-    using namespace std::tr1;
-    using namespace std::tr1::placeholders;
+    using std::tr1::bind;
+    using std::tr1::placeholders::_1;
 
     sent_comm.remove_if(comm_test_n_destroy);
     if (wait && !sent_comm.empty()) {
 
     sent_comm.remove_if(comm_test_n_destroy);
     if (wait && !sent_comm.empty()) {
index 8b316787b8ae1d8654e0f941337a64c993573f24..306687f2f8dd68de8d2bf82218adff88e4ff70d8 100644 (file)
@@ -148,8 +148,9 @@ int process::run()
 
 double process::sum_of_to_send() const
 {
 
 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<double>(),
 
     return std::accumulate(neigh.begin(), neigh.end(), 0.0,
                            bind(std::plus<double>(),
@@ -218,8 +219,8 @@ void process::send1_bookkeeping(neighbor& nb)
 
 void process::send()
 {
 
 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(),
 
     if (opt::bookkeeping) {
         std::for_each(neigh.begin(), neigh.end(),
@@ -283,8 +284,8 @@ void process::finalize1(neighbor& nb)
 
 void process::finalize()
 {
 
 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;
 
     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)) {                            \
 
 #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));  \
         XCLOG0(cat, logp, "Neighbor loads:");                           \
         std::for_each(vec.begin(), vec.end(),                           \
                       bind(&neighbor::print, _1, verbose, logp, cat));  \