From a598ba4ab351661fb86d89f8c741539bf0108733 Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Tue, 9 Jan 2024 14:42:47 +0100 Subject: [PATCH] [trivial] Add clang-tidy test that was erroneously commented out and remove useless const. --- misc/style/run-clang-tidy.py | 2 +- src/search/potentials/potential_optimizer.cc | 2 +- src/search/potentials/potential_optimizer.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/style/run-clang-tidy.py b/misc/style/run-clang-tidy.py index aaaebeefbd..2bc557ccde 100755 --- a/misc/style/run-clang-tidy.py +++ b/misc/style/run-clang-tidy.py @@ -62,7 +62,7 @@ def check_search_code_with_clang_tidy(): # Enable with CheckTriviallyCopyableMove=0 when we require # clang-tidy >= 6.0 (see issue856). # "performance-move-const-arg", - #"performance-move-constructor-init", + "performance-move-constructor-init", "performance-no-automatic-move", # "performance-no-int-to-ptr", # "performance-noexcept-destructor", diff --git a/src/search/potentials/potential_optimizer.cc b/src/search/potentials/potential_optimizer.cc index 35a7b5b15a..e6eb2e2df0 100644 --- a/src/search/potentials/potential_optimizer.cc +++ b/src/search/potentials/potential_optimizer.cc @@ -89,7 +89,7 @@ void PotentialOptimizer::optimize_for_samples(const vector &samples) { solve_and_extract(); } -const shared_ptr PotentialOptimizer::get_task() const { +shared_ptr PotentialOptimizer::get_task() const { return task; } diff --git a/src/search/potentials/potential_optimizer.h b/src/search/potentials/potential_optimizer.h index c1503b9894..fe5dca83d5 100644 --- a/src/search/potentials/potential_optimizer.h +++ b/src/search/potentials/potential_optimizer.h @@ -60,7 +60,7 @@ class PotentialOptimizer { explicit PotentialOptimizer(const plugins::Options &opts); ~PotentialOptimizer() = default; - const std::shared_ptr get_task() const; + std::shared_ptr get_task() const; bool potentials_are_bounded() const; void optimize_for_state(const State &state);