From 934a76f017203915569de9325f10a6a30d3f1533 Mon Sep 17 00:00:00 2001 From: rockerbacon Date: Wed, 11 Sep 2019 12:40:06 -0300 Subject: [PATCH 1/3] Added virtual destructor to abstract class ButtonActions to avoid errors during destruction of child classes --- src/logid/Actions.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/logid/Actions.h b/src/logid/Actions.h index fe5b5d7..1604f97 100644 --- a/src/logid/Actions.h +++ b/src/logid/Actions.h @@ -37,6 +37,8 @@ class Device; class ButtonAction { public: + virtual ~ButtonAction() = default; + Action type; virtual ButtonAction* copy(Device* dev) = 0; virtual void press() = 0; @@ -136,4 +138,4 @@ private: int dpi_inc; }; -#endif //ACTIONS_H \ No newline at end of file +#endif //ACTIONS_H From 4ca34a9825ce618607a1cdf981a81a2bca347fbc Mon Sep 17 00:00:00 2001 From: rockerbacon Date: Wed, 11 Sep 2019 12:44:18 -0300 Subject: [PATCH 2/3] Added -Wextra compiler flag to CMakeLists --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a8235b..69fbf1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,10 @@ cmake_minimum_required(VERSION 3.10) project(logiops) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -Wall") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -Wall -Wextra") set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) -add_subdirectory(src/logid) \ No newline at end of file +add_subdirectory(src/logid) From 15ed6dd45422d2821815aafd9ed4a394c2b6b0a8 Mon Sep 17 00:00:00 2001 From: rockerbacon Date: Wed, 11 Sep 2019 12:50:23 -0300 Subject: [PATCH 3/3] Changed tab to 4 spaces --- src/logid/Actions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logid/Actions.h b/src/logid/Actions.h index 1604f97..b5927ea 100644 --- a/src/logid/Actions.h +++ b/src/logid/Actions.h @@ -37,7 +37,7 @@ class Device; class ButtonAction { public: - virtual ~ButtonAction() = default; + virtual ~ButtonAction() = default; Action type; virtual ButtonAction* copy(Device* dev) = 0;