X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de6185e212ebc37ff11ff70278e3c4f68419b097..13b4df952c77383f50696e51fcbaa2d8bbd3b3b9:/src/motif/accel.cpp?ds=sidebyside diff --git a/src/motif/accel.cpp b/src/motif/accel.cpp index e3d7e23be3..d66f03b8af 100644 --- a/src/motif/accel.cpp +++ b/src/motif/accel.cpp @@ -25,10 +25,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData { - friend class WXDLLEXPORT wxAcceleratorTable; + friend class wxAcceleratorTable; public: wxAcceleratorRefData(); - ~wxAcceleratorRefData(); + virtual ~wxAcceleratorRefData(); public: int m_count; @@ -40,19 +40,18 @@ public: wxAcceleratorRefData::wxAcceleratorRefData() { m_count = 0; - m_entries = (wxAcceleratorEntry*) NULL; + m_entries = NULL; } wxAcceleratorRefData::~wxAcceleratorRefData() { - delete[] m_entries; - m_entries = (wxAcceleratorEntry*) NULL; + wxDELETEA(m_entries); m_count = 0; } wxAcceleratorTable::wxAcceleratorTable() { - m_refData = (wxAcceleratorRefData*) NULL; + m_refData = NULL; } wxAcceleratorTable::~wxAcceleratorTable() @@ -80,9 +79,9 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[] } -bool wxAcceleratorTable::Ok() const +bool wxAcceleratorTable::IsOk() const { - return (m_refData != (wxAcceleratorRefData*) NULL); + return (m_refData != NULL); } int wxAcceleratorTable::GetCount() const @@ -108,8 +107,8 @@ bool wxAcceleratorEntry::MatchesEvent(const wxKeyEvent& event) const bool accShiftDown = ((GetFlags() & wxACCEL_SHIFT) == wxACCEL_SHIFT); int accKeyCode = GetKeyCode(); int accKeyCode2 = GetKeyCode(); - if (isascii(accKeyCode2)) - accKeyCode2 = tolower(accKeyCode2); + if (wxIsascii(accKeyCode2)) + accKeyCode2 = wxTolower(accKeyCode2); return ((eventAltDown == accAltDown) && (eventCtrlDown == accCtrlDown) && (eventShiftDown == accShiftDown) &&