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

Comment out all removeXxx() methods

Use remove() instead in the class to be removed.
parent b1c47589
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,7 @@ class CaptureBase : public NodeBase, public std::enable_shared_from_this<Capture ...@@ -54,7 +54,7 @@ class CaptureBase : public NodeBase, public std::enable_shared_from_this<Capture
FeatureBasePtr addFeature(FeatureBasePtr _ft_ptr); FeatureBasePtr addFeature(FeatureBasePtr _ft_ptr);
FeatureBaseList& getFeatureList(); FeatureBaseList& getFeatureList();
void addFeatureList(FeatureBaseList& _new_ft_list); void addFeatureList(FeatureBaseList& _new_ft_list);
void removeFeature(FeatureBasePtr _ft_ptr); // void removeFeature(FeatureBasePtr _ft_ptr);
void getConstraintList(ConstraintBaseList& _ctr_list); void getConstraintList(ConstraintBaseList& _ctr_list);
...@@ -109,11 +109,11 @@ inline wolf::StateBlockPtr CaptureBase::getSensorOPtr() const ...@@ -109,11 +109,11 @@ inline wolf::StateBlockPtr CaptureBase::getSensorOPtr() const
} }
inline void CaptureBase::removeFeature(FeatureBasePtr _ft_ptr) //inline void CaptureBase::removeFeature(FeatureBasePtr _ft_ptr)
{ //{
feature_list_.remove(_ft_ptr); // feature_list_.remove(_ft_ptr);
// delete _ft_ptr; //// delete _ft_ptr;
} //}
inline unsigned int CaptureBase::id() inline unsigned int CaptureBase::id()
{ {
......
...@@ -78,7 +78,7 @@ class FeatureBase : public NodeBase, public std::enable_shared_from_this<Feature ...@@ -78,7 +78,7 @@ class FeatureBase : public NodeBase, public std::enable_shared_from_this<Feature
void setCapturePtr(CaptureBasePtr _cap_ptr){capture_ptr_ = _cap_ptr;} void setCapturePtr(CaptureBasePtr _cap_ptr){capture_ptr_ = _cap_ptr;}
ConstraintBasePtr addConstraint(ConstraintBasePtr _co_ptr); ConstraintBasePtr addConstraint(ConstraintBasePtr _co_ptr);
void removeConstraint(ConstraintBasePtr _co_ptr); // void removeConstraint(ConstraintBasePtr _co_ptr);
ConstraintBaseList& getConstraintList(); ConstraintBaseList& getConstraintList();
void getConstraintList(ConstraintBaseList & _ctr_list); void getConstraintList(ConstraintBaseList & _ctr_list);
...@@ -133,11 +133,11 @@ inline unsigned int FeatureBase::id() ...@@ -133,11 +133,11 @@ inline unsigned int FeatureBase::id()
return feature_id_; return feature_id_;
} }
inline void FeatureBase::removeConstraint(ConstraintBasePtr _co_ptr) //inline void FeatureBase::removeConstraint(ConstraintBasePtr _co_ptr)
{ //{
constraint_list_.remove(_co_ptr); // constraint_list_.remove(_co_ptr);
// delete _co_ptr; //// delete _co_ptr;
} //}
inline CaptureBasePtr FeatureBase::getCapturePtr() const inline CaptureBasePtr FeatureBase::getCapturePtr() const
{ {
......
...@@ -107,8 +107,8 @@ class FrameBase : public NodeBase, public std::enable_shared_from_this<FrameBase ...@@ -107,8 +107,8 @@ class FrameBase : public NodeBase, public std::enable_shared_from_this<FrameBase
CaptureBaseList& getCaptureList(); CaptureBaseList& getCaptureList();
CaptureBasePtr addCapture(CaptureBasePtr _capt_ptr); CaptureBasePtr addCapture(CaptureBasePtr _capt_ptr);
void removeCapture(const CaptureBaseIter& _capt_iter); // void removeCapture(const CaptureBaseIter& _capt_iter);
void removeCapture(const CaptureBasePtr _capt_ptr); // void removeCapture(const CaptureBasePtr _capt_ptr);
CaptureBasePtr hasCaptureOf(const SensorBasePtr _sensor_ptr); CaptureBasePtr hasCaptureOf(const SensorBasePtr _sensor_ptr);
void unlinkCapture(CaptureBasePtr _cap_ptr); void unlinkCapture(CaptureBasePtr _cap_ptr);
...@@ -231,19 +231,17 @@ inline CaptureBasePtr FrameBase::addCapture(CaptureBasePtr _capt_ptr) ...@@ -231,19 +231,17 @@ inline CaptureBasePtr FrameBase::addCapture(CaptureBasePtr _capt_ptr)
return _capt_ptr; return _capt_ptr;
} }
inline void FrameBase::removeCapture(const CaptureBaseIter& _capt_iter) //inline void FrameBase::removeCapture(const CaptureBaseIter& _capt_iter)
{ //{
//std::cout << "removing capture " << (*_capt_iter)->nodeId() << " from Frame " << nodeId() << std::endl; // //std::cout << "removing capture " << (*_capt_iter)->nodeId() << " from Frame " << nodeId() << std::endl;
capture_list_.erase(_capt_iter); // capture_list_.erase(_capt_iter);
// delete *_capt_iter; //}
} //
//inline void FrameBase::removeCapture(const CaptureBasePtr _capt_ptr)
inline void FrameBase::removeCapture(const CaptureBasePtr _capt_ptr) //{
{ // //std::cout << "removing capture " << (*_capt_iter)->nodeId() << " from Frame " << nodeId() << std::endl;
//std::cout << "removing capture " << (*_capt_iter)->nodeId() << " from Frame " << nodeId() << std::endl; // capture_list_.remove(_capt_ptr);
capture_list_.remove(_capt_ptr); //}
// delete _capt_ptr;
}
inline StateStatus FrameBase::getStatus() const inline StateStatus FrameBase::getStatus() const
{ {
......
...@@ -26,9 +26,9 @@ SensorBasePtr HardwareBase::addSensor(SensorBasePtr _sensor_ptr) ...@@ -26,9 +26,9 @@ SensorBasePtr HardwareBase::addSensor(SensorBasePtr _sensor_ptr)
return _sensor_ptr; return _sensor_ptr;
} }
void HardwareBase::removeSensor(SensorBasePtr _sensor_ptr) //void HardwareBase::removeSensor(SensorBasePtr _sensor_ptr)
{ //{
sensor_list_.remove(_sensor_ptr); // sensor_list_.remove(_sensor_ptr);
} //}
} // namespace wolf } // namespace wolf
...@@ -25,8 +25,8 @@ class HardwareBase : public NodeBase, public std::enable_shared_from_this<Hardwa ...@@ -25,8 +25,8 @@ class HardwareBase : public NodeBase, public std::enable_shared_from_this<Hardwa
virtual SensorBasePtr addSensor(SensorBasePtr _sensor_ptr); virtual SensorBasePtr addSensor(SensorBasePtr _sensor_ptr);
SensorBaseList& getSensorList(); SensorBaseList& getSensorList();
void removeSensor(const SensorBaseIter& _sensor_iter); // void removeSensor(const SensorBaseIter& _sensor_iter);
void removeSensor(SensorBasePtr _sensor_ptr); // void removeSensor(SensorBasePtr _sensor_ptr);
}; };
} // namespace wolf } // namespace wolf
...@@ -37,10 +37,10 @@ class HardwareBase : public NodeBase, public std::enable_shared_from_this<Hardwa ...@@ -37,10 +37,10 @@ class HardwareBase : public NodeBase, public std::enable_shared_from_this<Hardwa
namespace wolf { namespace wolf {
inline void HardwareBase::removeSensor(const SensorBaseIter& _sensor_iter) //inline void HardwareBase::removeSensor(const SensorBaseIter& _sensor_iter)
{ //{
sensor_list_.erase(_sensor_iter); // sensor_list_.erase(_sensor_iter);
} //}
inline SensorBaseList& HardwareBase::getSensorList() inline SensorBaseList& HardwareBase::getSensorList()
{ {
......
...@@ -50,17 +50,17 @@ void MapBase::addLandmarkList(LandmarkBaseList _landmark_list) ...@@ -50,17 +50,17 @@ void MapBase::addLandmarkList(LandmarkBaseList _landmark_list)
landmark_list_.splice(landmark_list_.end(), _landmark_list); landmark_list_.splice(landmark_list_.end(), _landmark_list);
} }
void MapBase::removeLandmark(LandmarkBasePtr _landmark_ptr) //void MapBase::removeLandmark(LandmarkBasePtr _landmark_ptr)
{ //{
landmark_list_.remove(_landmark_ptr); // landmark_list_.remove(_landmark_ptr);
// delete _landmark_ptr; //// delete _landmark_ptr;
} //}
//
void MapBase::removeLandmark(const LandmarkBaseIter& _landmark_iter) //void MapBase::removeLandmark(const LandmarkBaseIter& _landmark_iter)
{ //{
landmark_list_.erase(_landmark_iter); // landmark_list_.erase(_landmark_iter);
// delete * _landmark_iter; //// delete * _landmark_iter;
} //}
void MapBase::load(const std::string& _map_file_dot_yaml) void MapBase::load(const std::string& _map_file_dot_yaml)
{ {
......
...@@ -28,8 +28,8 @@ class MapBase : public NodeBase, public std::enable_shared_from_this<MapBase> ...@@ -28,8 +28,8 @@ class MapBase : public NodeBase, public std::enable_shared_from_this<MapBase>
virtual LandmarkBasePtr addLandmark(LandmarkBasePtr _landmark_ptr); virtual LandmarkBasePtr addLandmark(LandmarkBasePtr _landmark_ptr);
virtual void addLandmarkList(LandmarkBaseList _landmark_list); virtual void addLandmarkList(LandmarkBaseList _landmark_list);
void removeLandmark(const LandmarkBaseIter& _landmark_iter); // void removeLandmark(const LandmarkBaseIter& _landmark_iter);
void removeLandmark(LandmarkBasePtr _landmark_ptr); // void removeLandmark(LandmarkBasePtr _landmark_ptr);
LandmarkBaseList& getLandmarkList(); LandmarkBaseList& getLandmarkList();
void load(const std::string& _map_file_yaml); void load(const std::string& _map_file_yaml);
......
...@@ -90,7 +90,7 @@ class SensorBase : public NodeBase, public std::enable_shared_from_this<SensorBa ...@@ -90,7 +90,7 @@ class SensorBase : public NodeBase, public std::enable_shared_from_this<SensorBa
SensorType typeId(); SensorType typeId();
ProcessorBasePtr addProcessor(ProcessorBasePtr _proc_ptr); ProcessorBasePtr addProcessor(ProcessorBasePtr _proc_ptr);
void removeProcessor(ProcessorBasePtr _prc_ptr); // void removeProcessor(ProcessorBasePtr _prc_ptr);
ProcessorBaseList& getProcessorList(); ProcessorBaseList& getProcessorList();
...@@ -146,11 +146,11 @@ inline wolf::ProblemPtr SensorBase::getProblem() ...@@ -146,11 +146,11 @@ inline wolf::ProblemPtr SensorBase::getProblem()
return prb; return prb;
} }
inline void SensorBase::removeProcessor(ProcessorBasePtr _prc_ptr) //inline void SensorBase::removeProcessor(ProcessorBasePtr _prc_ptr)
{ //{
processor_list_.remove(_prc_ptr); // processor_list_.remove(_prc_ptr);
// delete _prc_ptr; //// delete _prc_ptr;
} //}
inline unsigned int SensorBase::id() inline unsigned int SensorBase::id()
{ {
......
...@@ -37,8 +37,8 @@ class TrajectoryBase : public NodeBase, public std::enable_shared_from_this<Traj ...@@ -37,8 +37,8 @@ class TrajectoryBase : public NodeBase, public std::enable_shared_from_this<Traj
// Frames // Frames
FrameBasePtr addFrame(FrameBasePtr _frame_ptr); FrameBasePtr addFrame(FrameBasePtr _frame_ptr);
void removeFrame(const FrameBaseIter& _frame_iter); // void removeFrame(const FrameBaseIter& _frame_iter);
void removeFrame(const FrameBasePtr _frame_ptr); // void removeFrame(const FrameBasePtr _frame_ptr);
FrameBaseList& getFrameList(); FrameBaseList& getFrameList();
FrameBasePtr getLastFramePtr(); FrameBasePtr getLastFramePtr();
FrameBasePtr getLastKeyFramePtr(); FrameBasePtr getLastKeyFramePtr();
...@@ -68,16 +68,16 @@ inline void TrajectoryBase::moveFrame(FrameBasePtr _frm_ptr, FrameBaseIter _plac ...@@ -68,16 +68,16 @@ inline void TrajectoryBase::moveFrame(FrameBasePtr _frm_ptr, FrameBaseIter _plac
} }
} }
inline void TrajectoryBase::removeFrame(const FrameBaseIter& _frame_iter) //inline void TrajectoryBase::removeFrame(const FrameBaseIter& _frame_iter)
{ //{
frame_list_.erase(_frame_iter); // frame_list_.erase(_frame_iter);
// delete * _frame_iter; //// delete * _frame_iter;
} //}
inline void TrajectoryBase::removeFrame(const FrameBasePtr _frame_ptr) //inline void TrajectoryBase::removeFrame(const FrameBasePtr _frame_ptr)
{ //{
frame_list_.remove(_frame_ptr); // frame_list_.remove(_frame_ptr);
// delete _frame_ptr; //// delete _frame_ptr;
} //}
inline FrameBaseList& TrajectoryBase::getFrameList() inline FrameBaseList& TrajectoryBase::getFrameList()
{ {
......
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