From f710808b3fbe8a6d59edd2ddf2140d00ba5049a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu>
Date: Wed, 7 Aug 2019 13:18:55 +0200
Subject: [PATCH] Add const to isMotion()

---
 include/core/processor/processor_base.h    | 4 ++--
 include/core/processor/processor_motion.h  | 4 ++--
 include/core/processor/processor_tracker.h | 2 ++
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/core/processor/processor_base.h b/include/core/processor/processor_base.h
index 3537f9603..b81467ced 100644
--- a/include/core/processor/processor_base.h
+++ b/include/core/processor/processor_base.h
@@ -292,7 +292,7 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce
         void setSensor(SensorBasePtr _sen_ptr){sensor_ptr_ = _sen_ptr;}
 
     public:
-        virtual bool isMotion();
+        virtual bool isMotion() const;
 
         void setTimeTolerance(Scalar _time_tolerance);
 
@@ -343,7 +343,7 @@ std::shared_ptr<classType> ProcessorBase::emplace(SensorBasePtr _sen_ptr, T&&...
     return prc;
 }
 
-inline bool ProcessorBase::isMotion()
+inline bool ProcessorBase::isMotion() const
 {
     return false;
 }
diff --git a/include/core/processor/processor_motion.h b/include/core/processor/processor_motion.h
index 6a96be5ef..0dfd2467d 100644
--- a/include/core/processor/processor_motion.h
+++ b/include/core/processor/processor_motion.h
@@ -159,7 +159,7 @@ class ProcessorMotion : public ProcessorBase
         virtual void resetDerived();
 
         // Queries to the processor:
-        virtual bool isMotion() override;
+        virtual bool isMotion() const override;
 
         /** \brief Fill a reference to the state integrated so far
          * \param _x the returned state vector
@@ -571,7 +571,7 @@ inline Motion ProcessorMotion::getMotion(const TimeStamp& _ts) const
     return capture_ptr->getBuffer().getMotion(_ts);
 }
 
-inline bool ProcessorMotion::isMotion()
+inline bool ProcessorMotion::isMotion() const
 {
     return true;
 }
diff --git a/include/core/processor/processor_tracker.h b/include/core/processor/processor_tracker.h
index 1c9277989..0a5d46a6b 100644
--- a/include/core/processor/processor_tracker.h
+++ b/include/core/processor/processor_tracker.h
@@ -108,6 +108,8 @@ class ProcessorTracker : public ProcessorBase
                          ProcessorParamsTrackerPtr _params_tracker);
         virtual ~ProcessorTracker();
 
+        virtual bool isMotion() const final override {return false; }
+
 
         bool checkTimeTolerance(const TimeStamp& _ts1, const TimeStamp& _ts2);
         bool checkTimeTolerance(const CaptureBasePtr _cap, const TimeStamp& _ts);
-- 
GitLab