Don't use wxOVERRIDE in wxDECLARE_EVENT_TABLE to avoid clang warnings
If a class not using "override" for its other, not wx-related, virtual methods included wxDECLARE_EVENT_TABLE() with wxOVERRIDE inside it, it resulted in a clang -Winconsistent-missing-override warning per each virtual method without it which was very annoying. Avoid it by not using wxOVERRIDE in this macro and explicitly disabling the -Winconsistent-missing-override for the methods inside it in case the rest of the class does use "override". Notice that this also required rearranging the order of the declarations in this macro to ensure that a semicolon is still required after it. Closes https://github.com/wxWidgets/wxWidgets/pull/217
This commit is contained in:
parent
59def94f63
commit
3351404c2c
@ -3973,10 +3973,12 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
|
||||
private: \
|
||||
static const wxEventTableEntry sm_eventTableEntries[]; \
|
||||
protected: \
|
||||
wxCLANG_WARNING_SUPPRESS(inconsistent-missing-override) \
|
||||
const wxEventTable* GetEventTable() const; \
|
||||
wxEventHashTable& GetEventHashTable() const; \
|
||||
wxCLANG_WARNING_RESTORE(inconsistent-missing-override) \
|
||||
static const wxEventTable sm_eventTable; \
|
||||
const wxEventTable* GetEventTable() const wxOVERRIDE; \
|
||||
static wxEventHashTable sm_eventHashTable; \
|
||||
wxEventHashTable& GetEventHashTable() const wxOVERRIDE
|
||||
static wxEventHashTable sm_eventHashTable
|
||||
|
||||
// N.B.: when building DLL with Borland C++ 5.5 compiler, you must initialize
|
||||
// sm_eventTable before using it in GetEventTable() or the compiler gives
|
||||
|
Loading…
Reference in New Issue
Block a user