Skip to content

Commit

Permalink
SVEventHandler: Define virtual destructor in .cpp file
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stweil committed Sep 4, 2018
1 parent 8e55146 commit 1c9bd51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/viewer/scrollview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/viewer/scrollview.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1c9bd51

Please sign in to comment.