Add missing virtual destructors (#1149)
* Add -Wnon-virtual-dtor -Woverloaded-virtual compiler options Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com> * Add missing virtual dtors Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com> * please linter Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
This commit is contained in:
parent
819612aec6
commit
769a9d0439
8 changed files with 11 additions and 4 deletions
|
@ -23,7 +23,7 @@ if(NOT CMAKE_CXX_STANDARD)
|
|||
set(CMAKE_CXX_STANDARD 14)
|
||||
endif()
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
add_compile_options(-Wall -Wextra -Wpedantic)
|
||||
add_compile_options(-Wall -Wextra -Wpedantic -Wnon-virtual-dtor -Woverloaded-virtual)
|
||||
endif()
|
||||
|
||||
set(${PROJECT_NAME}_SRCS
|
||||
|
|
|
@ -31,6 +31,7 @@ class RateBase
|
|||
public:
|
||||
RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(RateBase)
|
||||
|
||||
virtual ~RateBase() {}
|
||||
virtual bool sleep() = 0;
|
||||
virtual bool is_steady() const = 0;
|
||||
virtual void reset() = 0;
|
||||
|
|
|
@ -62,6 +62,7 @@ public:
|
|||
|
||||
/// TimerBase destructor
|
||||
RCLCPP_PUBLIC
|
||||
virtual
|
||||
~TimerBase();
|
||||
|
||||
/// Cancel the timer.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue