Fix to FIXME: better nothing than broken comparison.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-12-08 17:17:37 +00:00
parent 57e7524bad
commit 767e3be0fa
2 changed files with 10 additions and 4 deletions

View File

@@ -38,10 +38,13 @@ public:
virtual ~wxAcceleratorTable(); virtual ~wxAcceleratorTable();
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if ( *this != accel ) Ref(accel); return *this; } wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if ( *this != accel ) Ref(accel); return *this; }
#if WXWIN_COMPATIBILITY_2_4
bool operator==(const wxAcceleratorTable& accel) const bool operator==(const wxAcceleratorTable& accel) const
{ return m_refData == accel.m_refData; } // FIXME: this is wrong (VZ) { return m_refData == accel.m_refData; }
bool operator!=(const wxAcceleratorTable& accel) const bool operator!=(const wxAcceleratorTable& accel) const
{ return !(*this == accel); } { return !(*this == accel); }
#endif
bool Ok() const; bool Ok() const;
void SetHACCEL(WXHACCEL hAccel); void SetHACCEL(WXHACCEL hAccel);

View File

@@ -38,16 +38,19 @@ public:
virtual ~wxAcceleratorTable(); virtual ~wxAcceleratorTable();
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if ( *this != accel ) Ref(accel); return *this; } wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if ( *this != accel ) Ref(accel); return *this; }
#if WXWIN_COMPATIBILITY_2_4
bool operator==(const wxAcceleratorTable& accel) const bool operator==(const wxAcceleratorTable& accel) const
{ return m_refData == accel.m_refData; } // FIXME: this is wrong (VZ) { return m_refData == accel.m_refData; }
bool operator!=(const wxAcceleratorTable& accel) const bool operator!=(const wxAcceleratorTable& accel) const
{ return !(*this == accel); } { return !(*this == accel); }
#endif
bool Ok() const; bool Ok() const;
void SetHACCEL(WXHACCEL hAccel); void SetHACCEL(WXHACCEL hAccel);
WXHACCEL GetHACCEL() const; WXHACCEL GetHACCEL() const;
// translate the accelerator, return TRUE if done // translate the accelerator, return true if done
bool Translate(wxWindow *window, WXMSG *msg) const; bool Translate(wxWindow *window, WXMSG *msg) const;
private: private: