Add final specifier to public classes

Change-Id: Ib7291dc68d5d4141ee821689743481fc84768606
This commit is contained in:
Sameer Agarwal
2022-02-18 15:51:17 -08:00
parent 84e1696f4e
commit 8fe8ebc3a6
11 changed files with 33 additions and 34 deletions
+3 -2
View File
@@ -151,7 +151,8 @@ namespace ceres {
template <typename CostFunctor,
int kNumResiduals, // Number of residuals, or ceres::DYNAMIC.
int... Ns> // Number of parameters in each parameter block.
class AutoDiffCostFunction : public SizedCostFunction<kNumResiduals, Ns...> {
class AutoDiffCostFunction final
: public SizedCostFunction<kNumResiduals, Ns...> {
public:
// Takes ownership of functor by default. Uses the template-provided
// value for the number of residuals ("kNumResiduals").
@@ -215,7 +216,7 @@ class AutoDiffCostFunction : public SizedCostFunction<kNumResiduals, Ns...> {
jacobians);
};
const CostFunctor & functor() const { return *functor_; }
const CostFunctor& functor() const { return *functor_; }
private:
std::unique_ptr<CostFunctor> functor_;