Add wxOVERRIDE and use it in common and wxOSX code.
Make overriding virtual methods more explicit and enable additional checks provided by C++11 compilers when "override" is used. Closes #16100. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -59,7 +59,7 @@ public:
|
||||
const wxSize& GetSize() const { return m_size; }
|
||||
|
||||
|
||||
virtual void OnText(const wxString& text_)
|
||||
virtual void OnText(const wxString& text_) wxOVERRIDE
|
||||
{
|
||||
const wxString text(wxControl::RemoveMnemonics(text_));
|
||||
|
||||
@@ -79,12 +79,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnAttrStart(const Attr& attr)
|
||||
virtual void OnAttrStart(const Attr& attr) wxOVERRIDE
|
||||
{
|
||||
m_dc.SetFont(attr.font);
|
||||
}
|
||||
|
||||
virtual void OnAttrEnd(const Attr& WXUNUSED(attr))
|
||||
virtual void OnAttrEnd(const Attr& WXUNUSED(attr)) wxOVERRIDE
|
||||
{
|
||||
m_dc.SetFont(GetFont());
|
||||
}
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
m_origTextBackground = dc.GetTextBackground();
|
||||
}
|
||||
|
||||
virtual void OnText(const wxString& text_)
|
||||
virtual void OnText(const wxString& text_) wxOVERRIDE
|
||||
{
|
||||
wxString text;
|
||||
int indexAccel = wxControl::FindAccelIndex(text_, &text);
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
m_pos += bounds.width;
|
||||
}
|
||||
|
||||
virtual void OnAttrStart(const Attr& attr)
|
||||
virtual void OnAttrStart(const Attr& attr) wxOVERRIDE
|
||||
{
|
||||
m_dc.SetFont(attr.font);
|
||||
if ( attr.foreground.IsOk() )
|
||||
@@ -176,7 +176,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnAttrEnd(const Attr& attr)
|
||||
virtual void OnAttrEnd(const Attr& attr) wxOVERRIDE
|
||||
{
|
||||
// We always restore the font because we always change it...
|
||||
m_dc.SetFont(GetFont());
|
||||
|
Reference in New Issue
Block a user