X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd71308fc89eac2dd212b715eba68a993fa78f53..a2d541ca9c552d1a30ba75970968a7a220f4955a:/utils/wxprop/src/prop.cpp diff --git a/utils/wxprop/src/prop.cpp b/utils/wxprop/src/prop.cpp index 933f38a56c..59802962de 100644 --- a/utils/wxprop/src/prop.cpp +++ b/utils/wxprop/src/prop.cpp @@ -29,11 +29,15 @@ #include #include +#if wxUSE_IOSTREAMH #if defined(__WXMSW__) && !defined(__GNUWIN32__) #include #else #include #endif +#else +#include +#endif #include "wx/window.h" #include "wx/utils.h" @@ -204,7 +208,7 @@ wxPropertyValue::~wxPropertyValue(void) } case wxPropertyValueString: { - delete m_value.string; + delete[] m_value.string; break; } case wxPropertyValueList: @@ -378,7 +382,7 @@ void wxPropertyValue::Copy(wxPropertyValue& copyFrom) case wxPropertyValueStringPtr: { char** s = copyFrom.StringValuePtr(); - (*this) = s; + (*this) = s != 0; return ; } @@ -959,13 +963,13 @@ void wxPropertySheet::UpdateAllViews( wxPropertyView *WXUNUSED(thisView) ) // Add a property void wxPropertySheet::AddProperty(wxProperty *property) { - m_properties.Append(property->GetName().GetData(), property); + m_properties.Append((const char*) property->GetName(), property); } // Get property by name wxProperty *wxPropertySheet::GetProperty(wxString name) { - wxNode *node = m_properties.Find(name.GetData()); + wxNode *node = m_properties.Find((const char*) name); if (!node) return NULL; else @@ -1014,14 +1018,14 @@ wxPropertyValidatorRegistry::~wxPropertyValidatorRegistry(void) ClearRegistry(); } -void wxPropertyValidatorRegistry::RegisterValidator(wxString& typeName, wxPropertyValidator *validator) +void wxPropertyValidatorRegistry::RegisterValidator(const wxString& typeName, wxPropertyValidator *validator) { - Put(typeName.GetData(), validator); + Put((const char*) typeName, validator); } -wxPropertyValidator *wxPropertyValidatorRegistry::GetValidator(wxString& typeName) +wxPropertyValidator *wxPropertyValidatorRegistry::GetValidator(const wxString& typeName) { - return (wxPropertyValidator *)Get(typeName.GetData()); + return (wxPropertyValidator *)Get((const char*) typeName); } void wxPropertyValidatorRegistry::ClearRegistry(void)