diff --git a/include/core/capture/capture_base.h b/include/core/capture/capture_base.h index 4628d276bc8adebff02508062dbcd6ce87568588..ed71b00418991f34ee967f894fac38b0d78e981a 100644 --- a/include/core/capture/capture_base.h +++ b/include/core/capture/capture_base.h @@ -81,7 +81,7 @@ class CaptureBase : public NodeBase, public HasStateBlocks, public std::enable_s const FactorBasePtrList& getConstrainedByList() const; // State blocks - std::string getStructure() const; + const std::string& getStructure() const; StateBlockPtr getStateBlock(const std::string& _key) const; StateBlockPtr getStateBlock(const char _key) const { return getStateBlock(std::string(1, _key)); } StateBlockPtr getSensorP() const; diff --git a/src/capture/capture_base.cpp b/src/capture/capture_base.cpp index 03a51f3a5f731568acd49e73c276b0ddbcd6ebc7..d30785c88b81f25900dd6bd4b42af8f490f8e678 100644 --- a/src/capture/capture_base.cpp +++ b/src/capture/capture_base.cpp @@ -135,7 +135,7 @@ void CaptureBase::removeConstrainedBy(FactorBasePtr _fac_ptr) constrained_by_list_.remove(_fac_ptr); } -std::string CaptureBase::getStructure() const +const std::string& CaptureBase::getStructure() const { if (getSensor()) return getSensor()->getStructure();