From 1c9bd51de8edadad5a5695b9d79fced75d44e6bc Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 3 Sep 2018 16:30:29 +0200 Subject: [PATCH] SVEventHandler: Define virtual destructor in .cpp file This fixes compiler warnings from clang: src/viewer/scrollview.h:86:7: warning: 'SVEventHandler' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables] Signed-off-by: Stefan Weil --- src/viewer/scrollview.cpp | 2 ++ src/viewer/scrollview.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/viewer/scrollview.cpp b/src/viewer/scrollview.cpp index 70c40d7c..29e1819f 100644 --- a/src/viewer/scrollview.cpp +++ b/src/viewer/scrollview.cpp @@ -73,6 +73,8 @@ SVEvent* SVEvent::copy() { return any; } +SVEventHandler::~SVEventHandler() = default; + #ifndef GRAPHICS_DISABLED /// This is the main loop which handles the ScrollView-logic from the server /// to the client. It basically loops through messages, parses them to events diff --git a/src/viewer/scrollview.h b/src/viewer/scrollview.h index f30f699f..d0d675c9 100644 --- a/src/viewer/scrollview.h +++ b/src/viewer/scrollview.h @@ -85,7 +85,7 @@ struct SVEvent { // called whenever an appropriate event occurs. class SVEventHandler { public: - virtual ~SVEventHandler() {} + virtual ~SVEventHandler(); // Gets called by the SV Window. Does nothing on default, overwrite this // to implement the desired behaviour