From b74134f61dbdcbe949f5bc522966e9f9f8b7b81f Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Mon, 29 Sep 2008 10:53:48 +0000 Subject: [PATCH] more logic to avoid false warnings git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/ifacecheck/src/xmlparser.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/utils/ifacecheck/src/xmlparser.cpp b/utils/ifacecheck/src/xmlparser.cpp index 54522205f1..3942535b1f 100644 --- a/utils/ifacecheck/src/xmlparser.cpp +++ b/utils/ifacecheck/src/xmlparser.cpp @@ -97,6 +97,7 @@ void wxType::SetTypeFromString(const wxString& t) // fix this to avoid false positives m_strTypeClean.Replace("wxDateTime::", ""); m_strTypeClean.Replace("wxStockGDI::", ""); // same story for some other classes + m_strTypeClean.Replace("wxHelpEvent::", ""); } bool wxType::IsOk() const @@ -168,6 +169,11 @@ void wxArgumentType::SetDefaultValue(const wxString& defval, const wxString& def // fix this to avoid false positives m_strDefaultValueForCmp.Replace("wxDateTime::", ""); 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: if (m_strDefaultValueForCmp.Contains("wxGetTranslation")) @@ -186,6 +192,21 @@ bool wxArgumentType::operator==(const wxArgumentType& m) const (m_strDefaultValueForCmp.IsNumber() || m.m_strDefaultValueForCmp.IsNumber())) 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) { // maybe the default values are numbers. -- 2.45.2