From b00ff3b7662a152ea5440d6faafe57266faf988c Mon Sep 17 00:00:00 2001 From: Stephen Roderick Date: Tue, 25 Feb 2014 08:35:59 -0500 Subject: [PATCH 1/3] Make TaskContext::getName() a const function THe undelrying function that it calls in Service is a const function, and the TaskContext version does not modify anything. Without the const some compilers will error out, or produce warnings, when trying to get the name of a const TaskContext object, which is wrong. --- rtt/TaskContext.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtt/TaskContext.hpp b/rtt/TaskContext.hpp index 3b8a462..c2fed13 100644 --- a/rtt/TaskContext.hpp +++ b/rtt/TaskContext.hpp @@ -125,7 +125,7 @@ namespace RTT /** * Returns the name of this TaskContext. */ - virtual const std::string& getName() { return tcservice->getName(); } + virtual const std::string& getName() const { return tcservice->getName(); } /** * Sets the activity of this TaskContext. The -- 1.8.2.3