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
@@ -179,7 +179,8 @@ template <typename CostFunctor,
NumericDiffMethodType method = CENTRAL,
int kNumResiduals = 0, // Number of residuals, or ceres::DYNAMIC
int... Ns> // Parameters dimensions for each block.
class NumericDiffCostFunction : public SizedCostFunction<kNumResiduals, Ns...> {
class NumericDiffCostFunction final
: public SizedCostFunction<kNumResiduals, Ns...> {
public:
NumericDiffCostFunction(
CostFunctor* functor,
@@ -246,7 +247,7 @@ class NumericDiffCostFunction : public SizedCostFunction<kNumResiduals, Ns...> {
return true;
}
const CostFunctor & functor() const { return *functor_; }
const CostFunctor& functor() const { return *functor_; }
private:
std::unique_ptr<CostFunctor> functor_;