X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/63574b81fa41490a374c2d016e2894b42d0dcdc6..cbc9145c04bd3ea0a228906c8363fa8f47e3acf9:/src/common/variant.cpp diff --git a/src/common/variant.cpp b/src/common/variant.cpp index 2ebfcff9d8..b17b2c1f66 100644 --- a/src/common/variant.cpp +++ b/src/common/variant.cpp @@ -1628,6 +1628,23 @@ void wxVariant::operator= (void* value) } } +bool wxVariant::operator== (wxObject* value) const +{ + return (value == ((wxVariantDataWxObjectPtr*)GetData())->GetValue()); +} + +bool wxVariant::operator!= (wxObject* value) const +{ + return (!((*this) == (void*) value)); +} + +void wxVariant::operator= (wxObject* value) +{ + if (m_data) + delete m_data; + m_data = new wxVariantDataWxObjectPtr(value); +} + #if wxUSE_DATETIME bool wxVariant::operator== (const wxDateTime& value) const {