more logic to avoid false warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -97,6 +97,7 @@ void wxType::SetTypeFromString(const wxString& t)
|
|||||||
// fix this to avoid false positives
|
// fix this to avoid false positives
|
||||||
m_strTypeClean.Replace("wxDateTime::", "");
|
m_strTypeClean.Replace("wxDateTime::", "");
|
||||||
m_strTypeClean.Replace("wxStockGDI::", ""); // same story for some other classes
|
m_strTypeClean.Replace("wxStockGDI::", ""); // same story for some other classes
|
||||||
|
m_strTypeClean.Replace("wxHelpEvent::", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxType::IsOk() const
|
bool wxType::IsOk() const
|
||||||
@@ -168,6 +169,11 @@ void wxArgumentType::SetDefaultValue(const wxString& defval, const wxString& def
|
|||||||
// fix this to avoid false positives
|
// fix this to avoid false positives
|
||||||
m_strDefaultValueForCmp.Replace("wxDateTime::", "");
|
m_strDefaultValueForCmp.Replace("wxDateTime::", "");
|
||||||
m_strDefaultValueForCmp.Replace("wxStockGDI::", ""); // same story for some other classes
|
m_strDefaultValueForCmp.Replace("wxStockGDI::", ""); // same story for some other classes
|
||||||
|
m_strDefaultValueForCmp.Replace("wxHelpEvent::", ""); // same story for some other classes
|
||||||
|
|
||||||
|
m_strDefaultValueForCmp.Replace("wxGet_wxConvLocal()", "wxConvLocal");
|
||||||
|
|
||||||
|
m_strDefaultValueForCmp.Replace("* GetColour(COLOUR_BLACK)", "*wxBLACK");
|
||||||
|
|
||||||
// ADHOC-FIX:
|
// ADHOC-FIX:
|
||||||
if (m_strDefaultValueForCmp.Contains("wxGetTranslation"))
|
if (m_strDefaultValueForCmp.Contains("wxGetTranslation"))
|
||||||
@@ -186,6 +192,21 @@ bool wxArgumentType::operator==(const wxArgumentType& m) const
|
|||||||
(m_strDefaultValueForCmp.IsNumber() || m.m_strDefaultValueForCmp.IsNumber()))
|
(m_strDefaultValueForCmp.IsNumber() || m.m_strDefaultValueForCmp.IsNumber()))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// fix for default values which were replaced by gcc-xml with their numeric values
|
||||||
|
// (at this point we know that m_strTypeClean == m.m_strTypeClean):
|
||||||
|
if (m_strTypeClean == "long" || m_strTypeClean == "int")
|
||||||
|
{
|
||||||
|
if ((m_strDefaultValueForCmp.IsNumber() && m.m_strDefaultValueForCmp.StartsWith("wx")) ||
|
||||||
|
(m.m_strDefaultValueForCmp.IsNumber() && m_strDefaultValueForCmp.StartsWith("wx")))
|
||||||
|
{
|
||||||
|
if (g_verbose)
|
||||||
|
LogMessage("Supposing '%s' default value to be the same of '%s'...",
|
||||||
|
m_strDefaultValueForCmp, m.m_strDefaultValueForCmp);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (m_strDefaultValueForCmp != m.m_strDefaultValueForCmp)
|
if (m_strDefaultValueForCmp != m.m_strDefaultValueForCmp)
|
||||||
{
|
{
|
||||||
// maybe the default values are numbers.
|
// maybe the default values are numbers.
|
||||||
|
Reference in New Issue
Block a user