Skip to content

Commit 1c9bd51

Browse files
committed
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 <sw@weilnetz.de>
1 parent 8e55146 commit 1c9bd51

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/viewer/scrollview.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ SVEvent* SVEvent::copy() {
7373
return any;
7474
}
7575

76+
SVEventHandler::~SVEventHandler() = default;
77+
7678
#ifndef GRAPHICS_DISABLED
7779
/// This is the main loop which handles the ScrollView-logic from the server
7880
/// to the client. It basically loops through messages, parses them to events

src/viewer/scrollview.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ struct SVEvent {
8585
// called whenever an appropriate event occurs.
8686
class SVEventHandler {
8787
public:
88-
virtual ~SVEventHandler() {}
88+
virtual ~SVEventHandler();
8989

9090
// Gets called by the SV Window. Does nothing on default, overwrite this
9191
// to implement the desired behaviour

0 commit comments

Comments
 (0)