]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/context/Context.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't list the possible routings in DTD. We want to add more w/o changing the DTD
[simgrid.git] / src / kernel / context / Context.hpp
index 84dc1081ff42cae88be62de3b3650afac1cfe8b4..be67dd6a6f2ebc8d10fa2a93211ee83d755033dd 100644 (file)
@@ -34,7 +34,7 @@ public:
 protected:
   template <class T, class... Args> T* new_context(Args&&... args)
   {
-    T* context = new T(std::forward<Args>(args)...);
+    auto* context = new T(std::forward<Args>(args)...);
     context->declare_context(sizeof(T));
     return context;
   }
@@ -56,9 +56,9 @@ public:
 
   bool wannadie() const { return iwannadie_; }
   void set_wannadie(bool value = true) { iwannadie_ = value; }
-  void operator()() { code_(); }
+  void operator()() const { code_(); }
   bool has_code() const { return static_cast<bool>(code_); }
-  actor::ActorImpl* get_actor() { return this->actor_; }
+  actor::ActorImpl* get_actor() const { return this->actor_; }
 
   // Scheduling methods
   virtual void stop();