Skip to content
Snippets Groups Projects
Commit 2b903a58 authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Fix modernize-use-override warnings

parent 939a08a9
No related branches found
No related tags found
2 merge requests!28release after RAL,!27After 2nd RAL submission
Showing
with 48 additions and 48 deletions
......@@ -20,7 +20,7 @@ class CaptureGnss : public CaptureBase
public:
CaptureGnss(const TimeStamp& _ts, SensorBasePtr _sensor_ptr, GnssUtils::SnapshotPtr _snapshot);
~CaptureGnss();
~CaptureGnss() override;
GnssUtils::SnapshotPtr getSnapshot() const;
GnssUtils::ObservationsPtr getObservations() const;
......
......@@ -22,7 +22,7 @@ class CaptureGnssFix : public CaptureBase
public:
CaptureGnssFix(const TimeStamp& _ts, SensorBasePtr _sensor_ptr, const Eigen::Vector3d& _position, const Eigen::Matrix3d& _covariance, bool _ecef_coordinates = true);
virtual ~CaptureGnssFix();
~CaptureGnssFix() override;
const Eigen::Vector3d& getPositionEcef() const;
const Eigen::Matrix3d& getCovarianceEcef() const;
......
......@@ -31,7 +31,7 @@ class CaptureGnssTdcp : public CaptureBase
data_covariance_(_data_covariance),
origin_frame_ptr_(_origin_frame_ptr)
{};
virtual ~CaptureGnssTdcp(){};
~CaptureGnssTdcp() override{};
const Eigen::Vector3d& getData() const;
const Eigen::Matrix3d& getDataCovariance() const;
void getDataAndCovariance(Eigen::Vector3d& data, Eigen::Matrix3d& data_cov) const;
......
......@@ -41,9 +41,9 @@ class FactorGnssFix2d : public FactorAutodiff<FactorGnssFix2d, 3, 2, 1, 3, 3, 1,
WOLF_WARN_COND(!sensor_gnss_ptr_->isEnuDefined() && _status == FAC_ACTIVE, "Creating an active GNSS Fix 2d factor without initializing ENU");
}
virtual ~FactorGnssFix2d() = default;
~FactorGnssFix2d() override = default;
virtual std::string getTopology() const override
std::string getTopology() const override
{
return std::string("ABS");
}
......
......@@ -40,9 +40,9 @@ class FactorGnssFix3d : public FactorAutodiff<FactorGnssFix3d, 3, 3, 4, 3, 3, 1,
WOLF_WARN_COND(!sensor_gnss_ptr_->isEnuDefined() && _status == FAC_ACTIVE, "Creating an ACTIVE GNSS Fix 3d factor without initializing ENU");
}
virtual ~FactorGnssFix3d() = default;
~FactorGnssFix3d() override = default;
virtual std::string getTopology() const override
std::string getTopology() const override
{
return std::string("ABS");
}
......
......@@ -62,9 +62,9 @@ class FactorGnssPseudoRange : public FactorAutodiff<FactorGnssPseudoRange, 1, 3,
WOLF_WARN_COND(!sensor_gnss_ptr_->isEnuDefined() && _status == FAC_ACTIVE, "Creating FactorGnssPseudoRange without initializing ENU");
}
virtual ~FactorGnssPseudoRange() = default;
~FactorGnssPseudoRange() override = default;
virtual std::string getTopology() const override
std::string getTopology() const override
{
return std::string("ABS");
}
......
......@@ -64,9 +64,9 @@ class FactorGnssTdcp : public FactorAutodiff<FactorGnssTdcp, 1, 3, 4, 1, 3, 4, 1
d_pseudo_range_ = _ftr_k->getRange().L_corrected - _ftr_r->getRange().L_corrected;
}
virtual ~FactorGnssTdcp() = default;
~FactorGnssTdcp() override = default;
virtual std::string getTopology() const override
std::string getTopology() const override
{
return std::string("GEOM");
}
......
......@@ -42,9 +42,9 @@ class FactorGnssTdcp2d : public FactorAutodiff<FactorGnssTdcp2d, 3, 2, 1, 2, 1,
WOLF_WARN_COND(!sensor_gnss_ptr_->isEnuDefined(), "Creating a GNSS SingleDiff 2D factor without initializing ENU");
}
virtual ~FactorGnssTdcp2d() = default;
~FactorGnssTdcp2d() override = default;
virtual std::string getTopology() const override
std::string getTopology() const override
{
return std::string("MOTION");
}
......
......@@ -42,9 +42,9 @@ class FactorGnssTdcp3d : public FactorAutodiff<FactorGnssTdcp3d, 3, 3, 4, 3, 4,
WOLF_WARN_COND(!sensor_gnss_ptr_->isEnuDefined(), "Creating a GNSS SingleDiff 3D factor without initializing ENU");
}
virtual ~FactorGnssTdcp3d() = default;
~FactorGnssTdcp3d() override = default;
virtual std::string getTopology() const override
std::string getTopology() const override
{
return std::string("MOTION");
}
......
......@@ -25,7 +25,7 @@ class FeatureGnssFix : public FeatureBase
*/
FeatureGnssFix(const GnssUtils::ComputePosOutput& _gnss_fix_output);
virtual ~FeatureGnssFix(){};
~FeatureGnssFix() override{};
private:
GnssUtils::ComputePosOutput gnss_fix_output_;
......
......@@ -27,7 +27,7 @@ class FeatureGnssSatellite : public FeatureBase
*/
FeatureGnssSatellite(const obsd_t& _obs_sat, const GnssUtils::Satellite& _sat, const GnssUtils::Range& _range);
virtual ~FeatureGnssSatellite(){};
~FeatureGnssSatellite() override{};
const obsd_t& getObservation() const;
int satNumber() const;
......
......@@ -24,7 +24,7 @@ class FeatureGnssTdcp : public FeatureBase
FeatureBase("FeatureGnssTdcp", _measurement, _meas_covariance)
{};
virtual ~FeatureGnssTdcp(){};
~FeatureGnssTdcp() override{};
};
} // namespace wolf
......
......@@ -97,8 +97,8 @@ class ProcessorGnssFix : public ProcessorBase
public:
ProcessorGnssFix(ParamsProcessorGnssFixPtr _params);
virtual ~ProcessorGnssFix();
virtual void configure(SensorBasePtr _sensor) override;
~ProcessorGnssFix() override;
void configure(SensorBasePtr _sensor) override;
WOLF_PROCESSOR_CREATE(ProcessorGnssFix, ParamsProcessorGnssFix);
......@@ -108,39 +108,39 @@ class ProcessorGnssFix : public ProcessorBase
* Each derived processor should implement this function. It will be called if:
* - A new capture arrived and triggerInCapture() returned true.
*/
virtual void processCapture(CaptureBasePtr) override;
void processCapture(CaptureBasePtr) override;
/** \brief process an incoming key-frame
*
* The ProcessorTracker only processes incoming captures (it is not called).
*/
virtual void processKeyFrame(FrameBasePtr _keyframe_ptr, const double& _time_tolerance) override {};
void processKeyFrame(FrameBasePtr _keyframe_ptr, const double& _time_tolerance) override {};
/** \brief trigger in capture
*
* Returns true if processCapture() should be called after the provided capture arrived.
*/
virtual bool triggerInCapture(CaptureBasePtr) const override;
bool triggerInCapture(CaptureBasePtr) const override;
/** \brief trigger in key-frame
*
* The ProcessorTracker only processes incoming captures, then it returns false.
*/
virtual bool triggerInKeyFrame(FrameBasePtr _keyframe_ptr, const double& _time_tolerance) const override {return false;}
bool triggerInKeyFrame(FrameBasePtr _keyframe_ptr, const double& _time_tolerance) const override {return false;}
/** \brief store key frame
*
* Returns true if the key frame should be stored
*/
virtual bool storeKeyFrame(FrameBasePtr) override;
bool storeKeyFrame(FrameBasePtr) override;
/** \brief store capture
*
* Returns true if the capture should be stored
*/
virtual bool storeCapture(CaptureBasePtr) override;
bool storeCapture(CaptureBasePtr) override;
virtual bool voteForKeyFrame() const override;
bool voteForKeyFrame() const override;
private:
FactorBasePtr emplaceFactor(FeatureBasePtr _ftr_ptr);
......
......@@ -67,8 +67,8 @@ class ProcessorGnssTdcp : public ProcessorBase
public:
ProcessorGnssTdcp(ParamsProcessorGnssTdcpPtr _params_gnss);
virtual ~ProcessorGnssTdcp();
virtual void configure(SensorBasePtr _sensor) override;
~ProcessorGnssTdcp() override;
void configure(SensorBasePtr _sensor) override;
WOLF_PROCESSOR_CREATE(ProcessorGnssTdcp, ParamsProcessorGnssTdcp);
......@@ -80,39 +80,39 @@ class ProcessorGnssTdcp : public ProcessorBase
* Each derived processor should implement this function. It will be called if:
* - A new capture arrived and triggerInCapture() returned true.
*/
virtual void processCapture(CaptureBasePtr) override;
void processCapture(CaptureBasePtr) override;
/** \brief process an incoming key-frame
*
* The ProcessorTracker only processes incoming captures (it is not called).
*/
virtual void processKeyFrame(FrameBasePtr _keyframe, const double& _time_tolerance) override;
void processKeyFrame(FrameBasePtr _keyframe, const double& _time_tolerance) override;
/** \brief store key frame
*
* Returns true if the key frame should be stored
*/
virtual bool storeKeyFrame(FrameBasePtr) override {return false;};
bool storeKeyFrame(FrameBasePtr) override {return false;};
/** \brief store capture
*
* Returns true if the capture should be stored
*/
virtual bool storeCapture(CaptureBasePtr) override {return false;};
bool storeCapture(CaptureBasePtr) override {return false;};
/** \brief trigger in capture
*
* Returns true if processCapture() should be called after the provided capture arrived.
*/
virtual bool triggerInCapture(CaptureBasePtr) const override {return true;};
bool triggerInCapture(CaptureBasePtr) const override {return true;};
/** \brief trigger in key-frame
*
* The ProcessorTracker only processes incoming captures, then it returns false.
*/
virtual bool triggerInKeyFrame(FrameBasePtr _keyframe, const double& _time_tolerance) const override {return true;};
bool triggerInKeyFrame(FrameBasePtr _keyframe, const double& _time_tolerance) const override {return true;};
virtual bool voteForKeyFrame() const override;
bool voteForKeyFrame() const override;
private:
......
......@@ -109,12 +109,12 @@ class ProcessorTrackerGnss : public ProcessorTrackerFeature
public:
ProcessorTrackerGnss(ParamsProcessorTrackerGnssPtr _params_tracker_gnss);
virtual ~ProcessorTrackerGnss();
~ProcessorTrackerGnss() override;
// Factory method for high level API
WOLF_PROCESSOR_CREATE(ProcessorTrackerGnss, ParamsProcessorTrackerGnss);
virtual void configure(SensorBasePtr _sensor) override;
void configure(SensorBasePtr _sensor) override;
protected:
......@@ -136,7 +136,7 @@ class ProcessorTrackerGnss : public ProcessorTrackerFeature
*
* \return the number of features tracked
*/
virtual unsigned int trackFeatures(const FeatureBasePtrList& _features_in,
unsigned int trackFeatures(const FeatureBasePtrList& _features_in,
const CaptureBasePtr& _capture,
FeatureBasePtrList& _features_out,
FeatureMatchMap& _feature_correspondences) override;
......@@ -146,7 +146,7 @@ class ProcessorTrackerGnss : public ProcessorTrackerFeature
* \param _incoming_feature input/output feature in incoming capture to be corrected
* \return false if the the process discards the correspondence with origin's feature
*/
virtual bool correctFeatureDrift(const FeatureBasePtr _origin_feature, const FeatureBasePtr _last_feature, FeatureBasePtr _incoming_feature) override;
bool correctFeatureDrift(const FeatureBasePtr _origin_feature, const FeatureBasePtr _last_feature, FeatureBasePtr _incoming_feature) override;
/** \brief Vote for KeyFrame generation
*
......@@ -155,7 +155,7 @@ class ProcessorTrackerGnss : public ProcessorTrackerFeature
*
* WARNING! This function only votes! It does not create KeyFrames!
*/
virtual bool voteForKeyFrame() const override;
bool voteForKeyFrame() const override;
/** \brief Detect new Features
* \param _max_features maximum number of features detected (-1: unlimited. 0: none)
......@@ -171,13 +171,13 @@ class ProcessorTrackerGnss : public ProcessorTrackerFeature
* The function is called in ProcessorTrackerFeature::processNew() to set the member new_features_last_,
* the list of newly detected features of the capture last_ptr_.
*/
virtual unsigned int detectNewFeatures(const int& _max_new_features,
unsigned int detectNewFeatures(const int& _max_new_features,
const CaptureBasePtr& _capture,
FeatureBasePtrList& _features_out) override;
/** \brief OVERWRITTEN Emplaces tdcp and pseudorange factors
*/
virtual void establishFactors() override;
void establishFactors() override;
/** \brief Emplaces a new factor
* \param _feature_ptr pointer to the parent Feature
......@@ -185,7 +185,7 @@ class ProcessorTrackerGnss : public ProcessorTrackerFeature
*
* This function emplaces a factor of the appropriate type for the derived processor.
*/
virtual FactorBasePtr emplaceFactor(FeatureBasePtr _feature_ptr, FeatureBasePtr _feature_other_ptr) override{return nullptr;};
FactorBasePtr emplaceFactor(FeatureBasePtr _feature_ptr, FeatureBasePtr _feature_other_ptr) override{return nullptr;};
/** Pre-process incoming Capture
*
......@@ -198,7 +198,7 @@ class ProcessorTrackerGnss : public ProcessorTrackerFeature
* - initializing counters, flags, or any derived variables
* - initializing algorithms needed for processing the derived data
*/
virtual void preProcess() override;
void preProcess() override;
/** Post-process
*
......@@ -210,7 +210,7 @@ class ProcessorTrackerGnss : public ProcessorTrackerFeature
* - resetting and/or clearing variables and/or algorithms at the end of processing
* - drawing / printing / logging the results of the processing
*/
virtual void postProcess() override;
void postProcess() override;
void advanceDerived() override;
void resetDerived() override;
......
......@@ -22,7 +22,7 @@ struct ParamsSensorGnss : public ParamsSensorBase
bool translation_fixed = false;
Eigen::Vector3d ENU_latlonalt = Eigen::Vector3d::Zero();
virtual ~ParamsSensorGnss() = default;
~ParamsSensorGnss() override = default;
ParamsSensorGnss() = default;
ParamsSensorGnss(std::string _unique_name, const ParamsServer& _server):
ParamsSensorBase(_unique_name, _server)
......@@ -69,7 +69,7 @@ class SensorGnss : public SensorBase
const ParamsSensorGnssPtr& _ParamsSensor);
WOLF_SENSOR_CREATE(SensorGnss, ParamsSensorGnss, 3);
virtual ~SensorGnss();
~SensorGnss() override;
// Gets
StateBlockPtr getEnuMapTranslation() const;
......
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