Resolve -Wsuggest-override warnings.

This commit is contained in:
Maarten Bent
2016-12-14 22:23:04 +01:00
parent f6f72449fe
commit 87308746be
15 changed files with 61 additions and 61 deletions

View File

@@ -61,7 +61,7 @@ public:
wxCustomBackgroundWindow() { } wxCustomBackgroundWindow() { }
protected: protected:
virtual void DoSetBackgroundBitmap(const wxBitmap& bmp) virtual void DoSetBackgroundBitmap(const wxBitmap& bmp) wxOVERRIDE
{ {
m_bitmapBg = bmp; m_bitmapBg = bmp;

View File

@@ -46,19 +46,19 @@ public:
const wxString& name = wxTimePickerCtrlNameStr); const wxString& name = wxTimePickerCtrlNameStr);
// Implement pure virtual wxTimePickerCtrlBase methods. // Implement pure virtual wxTimePickerCtrlBase methods.
virtual void SetValue(const wxDateTime& date); virtual void SetValue(const wxDateTime& date) wxOVERRIDE;
virtual wxDateTime GetValue() const; virtual wxDateTime GetValue() const wxOVERRIDE;
protected: protected:
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const wxOVERRIDE;
virtual void DoMoveWindow(int x, int y, int width, int height); virtual void DoMoveWindow(int x, int y, int width, int height) wxOVERRIDE;
private: private:
void Init(); void Init();
// Return the list of the windows composing this one. // Return the list of the windows composing this one.
virtual wxWindowList GetCompositeWindowParts() const; virtual wxWindowList GetCompositeWindowParts() const wxOVERRIDE;
// Implementation data. // Implementation data.
class wxTimePickerGenericImpl* m_impl; class wxTimePickerGenericImpl* m_impl;

View File

@@ -35,18 +35,18 @@ protected:
// Common part of both ctors. // Common part of both ctors.
void Init(); void Init();
virtual void BeginMeasuring(); virtual void BeginMeasuring() wxOVERRIDE;
virtual void EndMeasuring(); virtual void EndMeasuring() wxOVERRIDE;
virtual void DoGetTextExtent(const wxString& string, virtual void DoGetTextExtent(const wxString& string,
wxCoord *width, wxCoord *width,
wxCoord *height, wxCoord *height,
wxCoord *descent = NULL, wxCoord *descent = NULL,
wxCoord *externalLeading = NULL); wxCoord *externalLeading = NULL) wxOVERRIDE;
virtual bool DoGetPartialTextExtents(const wxString& text, virtual bool DoGetPartialTextExtents(const wxString& text,
wxArrayInt& widths, wxArrayInt& widths,
double scaleX); double scaleX) wxOVERRIDE;
// This class is only used for DC text measuring with GTK+ 2 as GTK+ 3 uses // This class is only used for DC text measuring with GTK+ 2 as GTK+ 3 uses
// Cairo and not Pango for this. However it's still used even with GTK+ 3 // Cairo and not Pango for this. However it's still used even with GTK+ 3

View File

@@ -22,9 +22,9 @@ class WXDLLIMPEXP_CORE wxGTKTimerImpl : public wxTimerImpl
public: public:
wxGTKTimerImpl(wxTimer* timer) : wxTimerImpl(timer) { m_sourceId = 0; } wxGTKTimerImpl(wxTimer* timer) : wxTimerImpl(timer) { m_sourceId = 0; }
virtual bool Start( int millisecs = -1, bool oneShot = false ); virtual bool Start( int millisecs = -1, bool oneShot = false ) wxOVERRIDE;
virtual void Stop(); virtual void Stop() wxOVERRIDE;
virtual bool IsRunning() const { return m_sourceId != 0; } virtual bool IsRunning() const wxOVERRIDE { return m_sourceId != 0; }
protected: protected:
int m_sourceId; int m_sourceId;

View File

@@ -26,15 +26,15 @@ public:
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
int noUnitsX, int noUnitsY, int noUnitsX, int noUnitsY,
int xPos = 0, int yPos = 0, int xPos = 0, int yPos = 0,
bool noRefresh = false); bool noRefresh = false) wxOVERRIDE;
virtual void AdjustScrollbars(); virtual void AdjustScrollbars() wxOVERRIDE;
virtual bool IsScrollbarShown(int orient) const; virtual bool IsScrollbarShown(int orient) const wxOVERRIDE;
protected: protected:
virtual void DoScroll(int x, int y); virtual void DoScroll(int x, int y) wxOVERRIDE;
virtual void DoShowScrollbars(wxScrollbarVisibility horz, virtual void DoShowScrollbars(wxScrollbarVisibility horz,
wxScrollbarVisibility vert); wxScrollbarVisibility vert) wxOVERRIDE;
private: private:
// this does (each) half of AdjustScrollbars() work // this does (each) half of AdjustScrollbars() work

View File

@@ -30,11 +30,11 @@ public:
virtual ~wxEpollDispatcher(); virtual ~wxEpollDispatcher();
// implement base class pure virtual methods // implement base class pure virtual methods
virtual bool RegisterFD(int fd, wxFDIOHandler* handler, int flags = wxFDIO_ALL); virtual bool RegisterFD(int fd, wxFDIOHandler* handler, int flags = wxFDIO_ALL) wxOVERRIDE;
virtual bool ModifyFD(int fd, wxFDIOHandler* handler, int flags = wxFDIO_ALL); virtual bool ModifyFD(int fd, wxFDIOHandler* handler, int flags = wxFDIO_ALL) wxOVERRIDE;
virtual bool UnregisterFD(int fd); virtual bool UnregisterFD(int fd) wxOVERRIDE;
virtual bool HasPending() const; virtual bool HasPending() const wxOVERRIDE;
virtual int Dispatch(int timeout = TIMEOUT_INFINITE); virtual int Dispatch(int timeout = TIMEOUT_INFINITE) wxOVERRIDE;
private: private:
// ctor is private, use Create() // ctor is private, use Create()

View File

@@ -31,7 +31,7 @@ public:
} }
// Called when the associated descriptor is available for reading. // Called when the associated descriptor is available for reading.
virtual void OnReadWaiting() virtual void OnReadWaiting() wxOVERRIDE
{ {
// Sync process, process all data coming at us from the pipe so that // Sync process, process all data coming at us from the pipe so that
// the pipe does not get full and cause a deadlock situation. // the pipe does not get full and cause a deadlock situation.
@@ -44,8 +44,8 @@ public:
// These methods are never called as we only monitor the associated FD for // These methods are never called as we only monitor the associated FD for
// reading, but we still must implement them as they're pure virtual in the // reading, but we still must implement them as they're pure virtual in the
// base class. // base class.
virtual void OnWriteWaiting() { } virtual void OnWriteWaiting() wxOVERRIDE { }
virtual void OnExceptionWaiting() { } virtual void OnExceptionWaiting() wxOVERRIDE { }
// Disable any future calls to our OnReadWaiting(), can be called when // Disable any future calls to our OnReadWaiting(), can be called when
// we're sure that no more input is forthcoming. // we're sure that no more input is forthcoming.
@@ -93,7 +93,7 @@ public:
} }
private: private:
virtual void DoDisable() virtual void DoDisable() wxOVERRIDE
{ {
m_dispatcher.UnregisterFD(m_fd); m_dispatcher.UnregisterFD(m_fd);
} }
@@ -122,7 +122,7 @@ public:
} }
private: private:
virtual void DoDisable() virtual void DoDisable() wxOVERRIDE
{ {
delete m_source; delete m_source;
m_source = NULL; m_source = NULL;

View File

@@ -19,8 +19,8 @@
class wxFDIOManagerUnix : public wxFDIOManager class wxFDIOManagerUnix : public wxFDIOManager
{ {
public: public:
virtual int AddInput(wxFDIOHandler *handler, int fd, Direction d); virtual int AddInput(wxFDIOHandler *handler, int fd, Direction d) wxOVERRIDE;
virtual void RemoveInput(wxFDIOHandler *handler, int fd, Direction d); virtual void RemoveInput(wxFDIOHandler *handler, int fd, Direction d) wxOVERRIDE;
}; };
#endif // _UNIX_PRIVATE_FDIOUNIX_H_ #endif // _UNIX_PRIVATE_FDIOUNIX_H_

View File

@@ -60,9 +60,9 @@ public:
m_service(service) m_service(service)
{ } { }
virtual void OnReadWaiting(); virtual void OnReadWaiting() wxOVERRIDE;
virtual void OnWriteWaiting(); virtual void OnWriteWaiting() wxOVERRIDE;
virtual void OnExceptionWaiting(); virtual void OnExceptionWaiting() wxOVERRIDE;
protected: protected:
wxFSWatcherImplUnix* m_service; wxFSWatcherImplUnix* m_service;

View File

@@ -21,7 +21,7 @@ public:
bool IsOpened() const { return !Eof(); } bool IsOpened() const { return !Eof(); }
// return true if we have anything to read, don't block // return true if we have anything to read, don't block
virtual bool CanRead() const; virtual bool CanRead() const wxOVERRIDE;
}; };
class wxPipeOutputStream : public wxFileOutputStream class wxPipeOutputStream : public wxFileOutputStream
@@ -31,7 +31,7 @@ public:
// Override the base class version to ignore "pipe full" errors: this is // Override the base class version to ignore "pipe full" errors: this is
// not an error for this class. // not an error for this class.
size_t OnSysWrite(const void *buffer, size_t size); size_t OnSysWrite(const void *buffer, size_t size) wxOVERRIDE;
}; };
#endif // _WX_UNIX_PRIVATE_PIPESTREAM_H_ #endif // _WX_UNIX_PRIVATE_PIPESTREAM_H_

View File

@@ -34,9 +34,9 @@ public:
m_fds[1] = -1; m_fds[1] = -1;
} }
virtual wxSocketError GetLastError() const; virtual wxSocketError GetLastError() const wxOVERRIDE;
virtual void ReenableEvents(wxSocketEventFlags flags) virtual void ReenableEvents(wxSocketEventFlags flags) wxOVERRIDE
{ {
// enable the notifications about input/output being available again in // enable the notifications about input/output being available again in
// case they were disabled by OnRead/WriteWaiting() // case they were disabled by OnRead/WriteWaiting()
@@ -54,20 +54,20 @@ public:
} }
// wxFDIOHandler methods // wxFDIOHandler methods
virtual void OnReadWaiting(); virtual void OnReadWaiting() wxOVERRIDE;
virtual void OnWriteWaiting(); virtual void OnWriteWaiting() wxOVERRIDE;
virtual void OnExceptionWaiting(); virtual void OnExceptionWaiting() wxOVERRIDE;
virtual bool IsOk() const { return m_fd != INVALID_SOCKET; } virtual bool IsOk() const wxOVERRIDE { return m_fd != INVALID_SOCKET; }
private: private:
virtual void DoClose() virtual void DoClose() wxOVERRIDE
{ {
DisableEvents(); DisableEvents();
close(m_fd); close(m_fd);
} }
virtual void UnblockAndRegisterWithEventLoop() virtual void UnblockAndRegisterWithEventLoop() wxOVERRIDE
{ {
int trueArg = 1; int trueArg = 1;
ioctl(m_fd, FIONBIO, &trueArg); ioctl(m_fd, FIONBIO, &trueArg);
@@ -114,16 +114,16 @@ public:
m_fdioManager = NULL; m_fdioManager = NULL;
} }
virtual bool OnInit(); virtual bool OnInit() wxOVERRIDE;
virtual void OnExit() { } virtual void OnExit() wxOVERRIDE { }
virtual wxSocketImpl *CreateSocket(wxSocketBase& wxsocket) virtual wxSocketImpl *CreateSocket(wxSocketBase& wxsocket) wxOVERRIDE
{ {
return new wxSocketImplUnix(wxsocket); return new wxSocketImplUnix(wxsocket);
} }
virtual void Install_Callback(wxSocketImpl *socket_, wxSocketNotify event); virtual void Install_Callback(wxSocketImpl *socket_, wxSocketNotify event) wxOVERRIDE;
virtual void Uninstall_Callback(wxSocketImpl *socket_, wxSocketNotify event); virtual void Uninstall_Callback(wxSocketImpl *socket_, wxSocketNotify event) wxOVERRIDE;
protected: protected:
// get the FD index corresponding to the given wxSocketNotify // get the FD index corresponding to the given wxSocketNotify

View File

@@ -30,9 +30,9 @@ public:
wxUnixTimerImpl(wxTimer *timer); wxUnixTimerImpl(wxTimer *timer);
virtual ~wxUnixTimerImpl(); virtual ~wxUnixTimerImpl();
virtual bool IsRunning() const; virtual bool IsRunning() const wxOVERRIDE;
virtual bool Start(int milliseconds = -1, bool oneShot = false); virtual bool Start(int milliseconds = -1, bool oneShot = false) wxOVERRIDE;
virtual void Stop(); virtual void Stop() wxOVERRIDE;
// for wxTimerScheduler only: resets the internal flag indicating that the // for wxTimerScheduler only: resets the internal flag indicating that the
// timer is running // timer is running

View File

@@ -44,9 +44,9 @@ public:
// Implement wxEventLoopSourceHandler pure virtual methods // Implement wxEventLoopSourceHandler pure virtual methods
virtual void OnReadWaiting(); virtual void OnReadWaiting() wxOVERRIDE;
virtual void OnWriteWaiting() { } virtual void OnWriteWaiting() wxOVERRIDE { }
virtual void OnExceptionWaiting() { } virtual void OnExceptionWaiting() wxOVERRIDE { }
private: private:
wxPipe m_pipe; wxPipe m_pipe;
@@ -80,7 +80,7 @@ public:
WakeUpNoLock(); WakeUpNoLock();
} }
virtual void OnReadWaiting() virtual void OnReadWaiting() wxOVERRIDE
{ {
wxCriticalSectionLocker lock(m_pipeLock); wxCriticalSectionLocker lock(m_pipeLock);

View File

@@ -156,7 +156,7 @@ public:
m_win->Destroy(); m_win->Destroy();
} }
virtual void Show(wxWindow* parent) virtual void Show(wxWindow* parent) wxOVERRIDE
{ {
if ( !m_win ) if ( !m_win )
{ {
@@ -174,7 +174,7 @@ public:
} }
} }
virtual void Dismiss() virtual void Dismiss() wxOVERRIDE
{ {
if ( m_win ) if ( m_win )
{ {

View File

@@ -61,7 +61,7 @@ public:
delete m_handler; delete m_handler;
} }
bool Init() bool Init() wxOVERRIDE
{ {
wxCHECK_MSG( !IsOk(), false, "Inotify already initialized" ); wxCHECK_MSG( !IsOk(), false, "Inotify already initialized" );
@@ -98,7 +98,7 @@ public:
} }
} }
virtual bool DoAdd(wxSharedPtr<wxFSWatchEntryUnix> watch) virtual bool DoAdd(wxSharedPtr<wxFSWatchEntryUnix> watch) wxOVERRIDE
{ {
wxCHECK_MSG( IsOk(), false, wxCHECK_MSG( IsOk(), false,
"Inotify not initialized or invalid inotify descriptor" ); "Inotify not initialized or invalid inotify descriptor" );
@@ -121,7 +121,7 @@ public:
return true; return true;
} }
virtual bool DoRemove(wxSharedPtr<wxFSWatchEntryUnix> watch) virtual bool DoRemove(wxSharedPtr<wxFSWatchEntryUnix> watch) wxOVERRIDE
{ {
wxCHECK_MSG( IsOk(), false, wxCHECK_MSG( IsOk(), false,
"Inotify not initialized or invalid inotify descriptor" ); "Inotify not initialized or invalid inotify descriptor" );
@@ -157,7 +157,7 @@ public:
return true; return true;
} }
virtual bool RemoveAll() virtual bool RemoveAll() wxOVERRIDE
{ {
wxFSWatchEntries::iterator it = m_watches.begin(); wxFSWatchEntries::iterator it = m_watches.begin();
for ( ; it != m_watches.end(); ++it ) for ( ; it != m_watches.end(); ++it )