Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
use pimpl/piface combo for s4u storage
[simgrid.git] / include / simgrid / s4u / ConditionVariable.hpp
index 2ccf89d..b1e2be3 100644 (file)
@@ -35,7 +35,7 @@ XBT_PUBLIC_CLASS ConditionVariable
 private:
   friend s_smx_cond;
   smx_cond_t cond_;
-  ConditionVariable(smx_cond_t cond) : cond_(cond) {}
+  explicit ConditionVariable(smx_cond_t cond) : cond_(cond) {}
 public:
   ConditionVariable(ConditionVariable const&) = delete;
   ConditionVariable& operator=(ConditionVariable const&) = delete;
@@ -52,7 +52,7 @@ public:
   void wait(std::unique_lock<Mutex> & lock);
   template <class P> void wait(std::unique_lock<Mutex> & lock, P pred)
   {
-    while (!pred())
+    while (not pred())
       wait(lock);
   }
 
@@ -62,7 +62,7 @@ public:
   std::cv_status wait_for(std::unique_lock<Mutex> & lock, double duration);
   template <class P> bool wait_until(std::unique_lock<Mutex> & lock, double timeout_time, P pred)
   {
-    while (!pred())
+    while (not pred())
       if (this->wait_until(lock, timeout_time) == std::cv_status::timeout)
         return pred();
     return true;