Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add explicit keyword to one-parameter constructors.
[simgrid.git] / include / simgrid / simix / blocking_simcall.hpp
index 6341521..a856eca 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016. The SimGrid Team.
+/* Copyright (c) 2016-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -81,13 +81,13 @@ auto kernelSync(F code) -> decltype(code().get())
 template <class T>
 class Future {
 public:
-  Future() {}
-  Future(simgrid::kernel::Future<T> future) : future_(std::move(future)) {}
+  Future() { /* Nothing to do*/}
+  explicit Future(simgrid::kernel::Future<T> future) : future_(std::move(future)) {}
 
   bool valid() const { return future_.valid(); }
   T get()
   {
-    if (!valid())
+    if (not valid())
       throw std::future_error(std::future_errc::no_state);
     smx_actor_t self = SIMIX_process_self();
     simgrid::xbt::Result<T> result;
@@ -109,7 +109,7 @@ public:
   }
   bool is_ready() const
   {
-    if (!valid())
+    if (not valid())
       throw std::future_error(std::future_errc::no_state);
     return future_.is_ready();
   }