diff --git a/include/core/problem/problem.h b/include/core/problem/problem.h index f64f629056e3c5c52abc41818f049dc14b876438..63512663b68076b6c7da86285a548691889b37f4 100644 --- a/include/core/problem/problem.h +++ b/include/core/problem/problem.h @@ -83,7 +83,7 @@ class Problem : public std::enable_shared_from_this<Problem> // Properties ----------------------------------------- public: SizeEigen getDim() const; - StateStructure getFrameStructure() const; + const StateStructure& getFrameStructure() const; protected: void appendToStructure(const StateStructure& _structure); diff --git a/include/core/processor/is_motion.h b/include/core/processor/is_motion.h index 09d7bc68dee5511c28ee456bb42467e89168bbb4..08e500822a6fcdabcafc63d150c701d0c7d51e9b 100644 --- a/include/core/processor/is_motion.h +++ b/include/core/processor/is_motion.h @@ -29,8 +29,8 @@ class IsMotion virtual VectorComposite getState(const StateStructure& _structure = "") const = 0; virtual VectorComposite getState(const TimeStamp& _ts, const StateStructure& _structure = "") const = 0; - std::string getStateStructure(){return state_structure_;}; - void setStateStructure(std::string _state_structure){state_structure_ = _state_structure;}; + const StateStructure& getStateStructure ( ) { return state_structure_; }; + void setStateStructure(std::string _state_structure) { state_structure_ = _state_structure; }; void addToProblem(ProblemPtr _prb_ptr, IsMotionPtr _motion_ptr); protected: diff --git a/src/problem/problem.cpp b/src/problem/problem.cpp index 4f1b16ee54140a055a27e5abdeb1599f631cd1a5..b75b2eb0a6f961db7b9ceb217296f5cbf0f03530 100644 --- a/src/problem/problem.cpp +++ b/src/problem/problem.cpp @@ -543,7 +543,8 @@ SizeEigen Problem::getDim() const { return dim_; } -StateStructure Problem::getFrameStructure() const + +const StateStructure& Problem::getFrameStructure() const { return frame_structure_; }