From 6ac0203369d902cee727c65a37d8e32613121bbf Mon Sep 17 00:00:00 2001 From: Sebastian Eibl <sebastian.eibl@fau.de> Date: Tue, 9 Jun 2020 08:19:29 +0000 Subject: [PATCH] [CLANG-TIDY] modernize-use-override --- src/python_coupling/CreateConfig.cpp | 4 ++-- src/timeloop/python/Exports.cpp | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/python_coupling/CreateConfig.cpp b/src/python_coupling/CreateConfig.cpp index b3d1e5122..c50e72784 100644 --- a/src/python_coupling/CreateConfig.cpp +++ b/src/python_coupling/CreateConfig.cpp @@ -85,7 +85,7 @@ namespace python_coupling { public: PythonMultipleConfigGenerator( bp::stl_input_iterator< bp::dict > iterator ) : iter_( iterator ), firstTime_(true) {} - virtual shared_ptr<Config> next() + shared_ptr<Config> next() override { // this seemingly unnecessary complicated firstTime variable is used // since in alternative version where (++iter_) is at the end of the function @@ -119,7 +119,7 @@ namespace python_coupling { public: PythonSingleConfigGenerator( const shared_ptr<Config> & config ): config_ ( config ) {} - virtual shared_ptr<Config> next() + shared_ptr<Config> next() override { auto res = config_; config_.reset(); diff --git a/src/timeloop/python/Exports.cpp b/src/timeloop/python/Exports.cpp index f068b9947..3411e7f29 100644 --- a/src/timeloop/python/Exports.cpp +++ b/src/timeloop/python/Exports.cpp @@ -42,13 +42,13 @@ namespace timeloop { #endif struct ITimeloopWrap : public ITimeloop, public wrapper<ITimeloop> { - void run() { this->get_override( "run" )(); } - void singleStep() { this->get_override( "singleStep" )(); } - void stop() { this->get_override( "stop" )(); } - void synchronizedStop( bool s ) { this->get_override( "synchronizedStop" )(s); } - void setCurrentTimeStep( uint_t ts) { this->get_override( "setCurrentTimeStep" )(ts); } - uint_t getCurrentTimeStep() const { return this->get_override( "getCurrentTimeStep" )(); } - uint_t getNrOfTimeSteps() const { return this->get_override( "getNrOfTimeSteps" )(); } + void run() override { this->get_override( "run" )(); } + void singleStep() override { this->get_override( "singleStep" )(); } + void stop() override { this->get_override( "stop" )(); } + void synchronizedStop( bool s ) override { this->get_override( "synchronizedStop" )(s); } + void setCurrentTimeStep( uint_t ts) override { this->get_override( "setCurrentTimeStep" )(ts); } + uint_t getCurrentTimeStep() const override { return this->get_override( "getCurrentTimeStep" )(); } + uint_t getNrOfTimeSteps() const override { return this->get_override( "getNrOfTimeSteps" )(); } }; #ifdef WALBERLA_CXX_COMPILER_IS_GNU -- GitLab