- m_strDefaultValueForCmp = defvalForCmp.IsEmpty() ? m_strDefaultValue : defvalForCmp.Strip(wxString::both);
-
- // adjust aesthetic form of DefaultValue for the modify mode of ifacecheck:
- // we may need to write it out in an interface header
- if (m_strDefaultValue == "0u")
- m_strDefaultValue = "0";
-
- // in order to make valid&simple comparison on argument defaults,
- // we reduce some of the multiple forms in which the same things may appear
- // to a single form:
- if (m_strDefaultValueForCmp == "0u")
- m_strDefaultValueForCmp = "0";
-/*
- if (IsPointer())
- m_strDefaultValueForCmp.Replace("0", "NULL");
- else
- m_strDefaultValueForCmp.Replace("NULL", "0");
-*/
+ m_strDefaultValueForCmp = defvalForCmp.IsEmpty() ?
+ m_strDefaultValue : defvalForCmp.Strip(wxString::both);
+
+
+ // clean the default argument strings
+ // ----------------------------------
+
+ // Note: we adjust the aesthetic form of the m_strDefaultValue string for the "modify mode"
+ // of ifacecheck: we may need to write it out in an interface header
+
+ wxString *p = NULL;
+ for (int i=0; i<2; i++) // to avoid copying&pasting the code!
+ {
+ if (i == 0) p = &m_strDefaultValue;
+ if (i == 1) p = &m_strDefaultValueForCmp;
+
+ if (*p == "0u" || *p == "0l") *p = "0";
+
+ p->Replace("0x000000001", "1");
+ p->Replace("\\000\\000\\000", ""); // fix for unicode strings:
+ p->Replace("\\011", "\\t");
+ p->Replace("e+0", "");
+ p->Replace("2147483647", "__INT_MAX__");
+
+ // ADHOC-FIX: for wxConv* default values
+ p->Replace("wxConvAuto(wxFONTENCODING_DEFAULT)", "wxConvAuto()");
+ p->Replace("wxGet_wxConvUTF8()", "wxConvUTF8");
+ p->Replace("wxGet_wxConvLocal()", "wxConvLocal");
+ }
+
+
+ // clean ONLY the default argument string specific for comparison
+ // --------------------------------------------------------------
+
+ if (m_strDefaultValueForCmp.StartsWith("wxT(") &&
+ m_strDefaultValueForCmp.EndsWith(")"))
+ {
+ // get rid of the wxT() part
+ unsigned int len = m_strDefaultValueForCmp.Len();
+ m_strDefaultValueForCmp = m_strDefaultValueForCmp.Mid(4,len-5);
+ }
+