Return empty string from wxDisplayImpl::GetName() by default

Simplify the code by not making this function pure virtual as all the
ports except MSW had to override it just to return an empty string.

Instead, just return empty string by default as it's not critical to
force the derived classes to override this function.
This commit is contained in:
Vadim Zeitlin
2018-10-04 16:37:12 +02:00
parent f704c40207
commit 9cc1424b84
5 changed files with 1 additions and 19 deletions

View File

@@ -79,7 +79,7 @@ public:
virtual wxRect GetClientArea() const { return GetGeometry(); }
// return the name (may be empty)
virtual wxString GetName() const = 0;
virtual wxString GetName() const { return wxString(); }
// return the index of this display
unsigned GetIndex() const { return m_index; }
@@ -125,8 +125,6 @@ class WXDLLEXPORT wxDisplayImplSingle : public wxDisplayImpl
public:
wxDisplayImplSingle() : wxDisplayImpl(0) { }
virtual wxString GetName() const wxOVERRIDE { return wxString(); }
#if wxUSE_DISPLAY
// no video modes support for us, provide just the stubs
virtual wxArrayVideoModes