From 76a018f7f259011afdaf57e31439dee9313fad4c Mon Sep 17 00:00:00 2001 From: Christian Heinrich Date: Fri, 29 Jun 2018 11:21:57 +0200 Subject: [PATCH] [S4U] Actor: Add 'const' keyword to getter methods This signals to users that calling these methods will not change the state of the object. --- src/simix/ActorImpl.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/simix/ActorImpl.hpp b/src/simix/ActorImpl.hpp index 3dd5f0cf11..c650cd2027 100644 --- a/src/simix/ActorImpl.hpp +++ b/src/simix/ActorImpl.hpp @@ -114,14 +114,14 @@ private: bool daemon = false; public: void daemonize(); - bool isDaemon() { return daemon; } /** Whether this actor has been daemonized */ - bool isSuspended() { return suspended; } + bool isDaemon() const { return daemon; } /** Whether this actor has been daemonized */ + bool isSuspended() const { return suspended; } simgrid::s4u::Actor* restart(); smx_activity_t suspend(ActorImpl* issuer); void resume(); smx_activity_t sleep(double duration); void setUserData(void* data) { userdata = data; } - void* getUserData() { return userdata; } + void* getUserData() const { return userdata; } }; /* Used to keep the list of actors blocked on a synchro */ -- 2.20.1