mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Use override instead of virtual for subclasses.
Now that we are using c++11, it is safer to use override in subclasses instead of virtual. This CL does it for the interface, a follow up CL will do it for other parts of the code base. Change-Id: Ice8d0f4355cb700019d7a9c1566fbff0099e97d6
This commit is contained in:
@@ -83,9 +83,9 @@ class DynamicAutoDiffCostFunction : public DynamicCostFunction {
|
||||
|
||||
virtual ~DynamicAutoDiffCostFunction() {}
|
||||
|
||||
virtual bool Evaluate(double const* const* parameters,
|
||||
double* residuals,
|
||||
double** jacobians) const {
|
||||
bool Evaluate(double const* const* parameters,
|
||||
double* residuals,
|
||||
double** jacobians) const override {
|
||||
CHECK_GT(num_residuals(), 0)
|
||||
<< "You must call DynamicAutoDiffCostFunction::SetNumResiduals() "
|
||||
<< "before DynamicAutoDiffCostFunction::Evaluate().";
|
||||
|
||||
Reference in New Issue
Block a user