- if (overloads.GetCount()==0)
- {
- /*
- TODO: sometimes the interface headers re-document a method
- inherited from a base class even if the real header does
- not actually re-implement it.
- To avoid false positives, we'd need to search in the base classes
- of api[] classes and search for a matching method.
- */
- LogMessage("%s: real '%s' class has no method '%s'",
- header, searchedclasses, m.GetAsString());
- // we've found no overloads
- }
- else
- {
- // first, output a warning
- wxString warning = header;
- if (overloads.GetCount()>1)
- warning += wxString::Format(": in the real headers there are %d overloads of '%s' for "
- "'%s' all with different signatures:\n",
- overloads.GetCount(), m.GetName(), searchedclasses);
- else
- warning += wxString::Format(": in the real headers there is a method '%s' for '%s'"
- " but has different signature:\n",
- m.GetName(), searchedclasses);
+#define HACK_TO_AUTO_CORRECT_ONLY_METHOD_ATTRIBUTES 0
+#if HACK_TO_AUTO_CORRECT_ONLY_METHOD_ATTRIBUTES
+ for (unsigned int k=0; k<overloads.GetCount(); k++)
+ if (overloads[k]->MatchesExceptForAttributes(m))
+ {
+ // fix default values of results[k]:
+ wxMethod tmp(*overloads[k]);
+ tmp.SetArgumentTypes(m.GetArgumentTypes());