X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4a3bdee6a979146c426cd058e9bfe6b58135b124..d1a6e2b7a103d761fbc15e0e9c1c20ab53a849d9:/contrib/src/deprecated/proplist.cpp diff --git a/contrib/src/deprecated/proplist.cpp b/contrib/src/deprecated/proplist.cpp index e8d5ae0fde..58cf7d29d8 100644 --- a/contrib/src/deprecated/proplist.cpp +++ b/contrib/src/deprecated/proplist.cpp @@ -57,6 +57,11 @@ #include #include +#if !WXWIN_COMPATIBILITY_2_4 +static inline wxChar* copystring(const wxChar* s) + { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); } +#endif + // ---------------------------------------------------------------------------- // Property text edit control // ---------------------------------------------------------------------------- @@ -1026,11 +1031,7 @@ bool wxBoolListValidator::OnRetrieveValue(wxProperty *property, wxPropertyListVi return FALSE; wxString value(view->GetValueText()->GetValue()); - bool boolValue = FALSE; - if (value == wxT("True")) - boolValue = TRUE; - else - boolValue = FALSE; + bool boolValue = (value == wxT("True")); property->GetValue() = (bool)boolValue; return TRUE; } @@ -1253,7 +1254,7 @@ bool wxStringListValidator::OnDoubleClick( wxProperty *property, wxChar *s = node->GetData(); if (wxStrcmp(s, currentString) == 0) { - wxChar *nextString = NULL; + wxChar *nextString; if (node->GetNext()) nextString = node->GetNext()->GetData(); else