Don't use wxVector<T>::clear() when T is an incomplete type

At least the OpenVMS compiler doesn't like it and we can easily avoid
doing this by simply moving ClearExtraAccels() definition to the source
file.
This commit is contained in:
Vadim Zeitlin 2021-12-03 15:37:11 +01:00
parent 149db36bc8
commit 8311951f03
2 changed files with 6 additions and 1 deletions

View File

@ -131,7 +131,7 @@ public:
// return vector of extra accels. Implementation only. // return vector of extra accels. Implementation only.
const wxVector<wxAcceleratorEntry>& GetExtraAccels() const { return m_extraAccels; } const wxVector<wxAcceleratorEntry>& GetExtraAccels() const { return m_extraAccels; }
virtual void ClearExtraAccels() { m_extraAccels.clear(); } virtual void ClearExtraAccels();
#endif // wxUSE_ACCEL #endif // wxUSE_ACCEL
#if WXWIN_COMPATIBILITY_2_8 #if WXWIN_COMPATIBILITY_2_8

View File

@ -301,6 +301,11 @@ void wxMenuItemBase::AddExtraAccel(const wxAcceleratorEntry& accel)
m_extraAccels.push_back(accel); m_extraAccels.push_back(accel);
} }
void wxMenuItemBase::ClearExtraAccels()
{
m_extraAccels.clear();
}
#endif // wxUSE_ACCEL #endif // wxUSE_ACCEL
void wxMenuItemBase::SetItemLabel(const wxString& str) void wxMenuItemBase::SetItemLabel(const wxString& str)