Skip to content
Snippets Groups Projects
Commit ede29161 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

add const to return value

parent 549799da
No related branches found
No related tags found
1 merge request!323Resolve "New data structure for storing stateblocks"
Pipeline #4715 passed
...@@ -81,7 +81,7 @@ class CaptureBase : public NodeBase, public HasStateBlocks, public std::enable_s ...@@ -81,7 +81,7 @@ class CaptureBase : public NodeBase, public HasStateBlocks, public std::enable_s
const FactorBasePtrList& getConstrainedByList() const; const FactorBasePtrList& getConstrainedByList() const;
// State blocks // State blocks
std::string getStructure() const; const std::string& getStructure() const;
StateBlockPtr getStateBlock(const std::string& _key) const; StateBlockPtr getStateBlock(const std::string& _key) const;
StateBlockPtr getStateBlock(const char _key) const { return getStateBlock(std::string(1, _key)); } StateBlockPtr getStateBlock(const char _key) const { return getStateBlock(std::string(1, _key)); }
StateBlockPtr getSensorP() const; StateBlockPtr getSensorP() const;
......
...@@ -135,7 +135,7 @@ void CaptureBase::removeConstrainedBy(FactorBasePtr _fac_ptr) ...@@ -135,7 +135,7 @@ void CaptureBase::removeConstrainedBy(FactorBasePtr _fac_ptr)
constrained_by_list_.remove(_fac_ptr); constrained_by_list_.remove(_fac_ptr);
} }
std::string CaptureBase::getStructure() const const std::string& CaptureBase::getStructure() const
{ {
if (getSensor()) if (getSensor())
return getSensor()->getStructure(); return getSensor()->getStructure();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment