Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Provide File::open with 3 arguments.
[simgrid.git] / include / xbt / functional.hpp
index f4065f8e35c670f0f4c229e7c1cde5252994d533..1bb1e36e5eda6bb98f5e1ddb624723b1ea5ffc3e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2015-2022. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -168,7 +168,7 @@ public:
   }
 
 private:
-  template <class F> typename std::enable_if_t<canSBO<F>()> init(F code)
+  template <class F> typename std::enable_if_t<canSBO<F>()> init(F task_code)
   {
     const static TaskVtable vtable {
       // Call:
@@ -194,11 +194,11 @@ private:
         src_code->~F();
       }
     };
-    new(&buffer_) F(std::move(code));
+    new (&buffer_) F(std::move(task_code));
     vtable_ = &vtable;
   }
 
-  template <class F> typename std::enable_if_t<not canSBO<F>()> init(F code)
+  template <class F> typename std::enable_if_t<not canSBO<F>()> init(F task_code)
   {
     const static TaskVtable vtable {
       // Call:
@@ -216,7 +216,7 @@ private:
       // Move:
       nullptr
     };
-    *reinterpret_cast<F**>(&buffer_) = new F(std::move(code));
+    *reinterpret_cast<F**>(&buffer_) = new F(std::move(task_code));
     vtable_ = &vtable;
   }