Merge pull request #2 from rockerbacon/clean-warnings

Add virtual destructor to ButtonAction + extra warning flag
This commit is contained in:
pixl 2019-09-11 20:45:46 -04:00 committed by GitHub
commit d5c5c9040c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.10)
project(logiops) project(logiops)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -Wall") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -Wall -Wextra")
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)

View File

@ -37,6 +37,8 @@ class Device;
class ButtonAction class ButtonAction
{ {
public: public:
virtual ~ButtonAction() = default;
Action type; Action type;
virtual ButtonAction* copy(Device* dev) = 0; virtual ButtonAction* copy(Device* dev) = 0;
virtual void press() = 0; virtual void press() = 0;