From 15b6e6e6b327ee4bf3e7995df97f85f0f318145a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Wed, 6 Dec 2023 16:24:46 +0100
Subject: [PATCH] =?UTF-8?q?MEX=20files:=20no=20longer=20use=20=E2=80=9Cvir?=
 =?UTF-8?q?tual=E2=80=9D=20keyword=20when=20overriding=20a=20method?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Automatically detected by clang-tidy with modernize-use-override check.
---
 mex/sources/k_order_welfare/objective_m.hh                  | 3 +--
 mex/sources/libkorder/dynamic_dll.hh                        | 2 +-
 mex/sources/libkorder/dynamic_m.hh                          | 3 +--
 mex/sources/perfect_foresight_problem/DynamicModelCaller.hh | 1 -
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/mex/sources/k_order_welfare/objective_m.hh b/mex/sources/k_order_welfare/objective_m.hh
index 0e999c26d8..fec3ce89ae 100644
--- a/mex/sources/k_order_welfare/objective_m.hh
+++ b/mex/sources/k_order_welfare/objective_m.hh
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2021 Dynare Team
+ * Copyright © 2021-2023 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -37,7 +37,6 @@ private:
 
 public:
   explicit ObjectiveMFile(const std::string& modName, int ntt_arg);
-  virtual ~ObjectiveMFile() = default;
   void eval(const Vector& y, const Vector& x, const Vector& params, Vector& residual,
             std::vector<TwoDMatrix>& md) override;
 };
diff --git a/mex/sources/libkorder/dynamic_dll.hh b/mex/sources/libkorder/dynamic_dll.hh
index bd1d10f855..7b8af3f68b 100644
--- a/mex/sources/libkorder/dynamic_dll.hh
+++ b/mex/sources/libkorder/dynamic_dll.hh
@@ -101,7 +101,7 @@ private:
 public:
   // construct and load Dynamic model DLL
   explicit DynamicModelDLL(const std::string& fname, int ntt_arg, int order);
-  virtual ~DynamicModelDLL();
+  ~DynamicModelDLL() override;
 
   void eval(const Vector& y, const Vector& x, const Vector& params, const Vector& ySteady,
             Vector& residual, std::vector<TwoDMatrix>& md) override;
diff --git a/mex/sources/libkorder/dynamic_m.hh b/mex/sources/libkorder/dynamic_m.hh
index 7cd6af78ef..697686f0af 100644
--- a/mex/sources/libkorder/dynamic_m.hh
+++ b/mex/sources/libkorder/dynamic_m.hh
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2010-2022 Dynare Team
+ * Copyright © 2010-2023 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -45,7 +45,6 @@ private:
 
 public:
   explicit DynamicModelMFile(const std::string& modName, int ntt_arg);
-  virtual ~DynamicModelMFile() = default;
   void eval(const Vector& y, const Vector& x, const Vector& params, const Vector& ySteady,
             Vector& residual, std::vector<TwoDMatrix>& md) override;
 };
diff --git a/mex/sources/perfect_foresight_problem/DynamicModelCaller.hh b/mex/sources/perfect_foresight_problem/DynamicModelCaller.hh
index 7eaa4da80c..b157c2c6e9 100644
--- a/mex/sources/perfect_foresight_problem/DynamicModelCaller.hh
+++ b/mex/sources/perfect_foresight_problem/DynamicModelCaller.hh
@@ -80,7 +80,6 @@ public:
   DynamicModelDllCaller(size_t ntt, mwIndex ny, mwIndex nx, const double* params_arg,
                         const double* steady_state_arg, const int32_T* g1_sparse_colptr_arg,
                         bool linear_arg, bool compute_jacobian_arg);
-  virtual ~DynamicModelDllCaller() = default;
   [[nodiscard]] double*
   y() override
   {
-- 
GitLab