]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/ifacecheck/src/ifacecheck.cpp
added wxArgumentType; added parsing of argument names, so that the modify mode retain...
[wxWidgets.git] / utils / ifacecheck / src / ifacecheck.cpp
index 3a6a2bbec8d758d61ba420d1f2b18a21727deaf3..8e4f593ce5d48d72ace686145858b7fcd108596b 100644 (file)
@@ -336,8 +336,22 @@ void IfaceCheckApp::FixMethod(const wxString& header, const wxMethod* iface, con
         file.InsertLine(INDENTATION_STR + "*/", start++);
     }
 
+    wxMethod tmp(*api);
+
+    // discard API argument names and replace them with those parsed from doxygen XML:
+    const wxArgumentTypeArray& doxygenargs = iface->GetArgumentTypes();
+    const wxArgumentTypeArray& realargs = api->GetArgumentTypes();
+    if (realargs.GetCount() == doxygenargs.GetCount())
+    {
+        for (unsigned int j=0; j<doxygenargs.GetCount(); j++)
+            if (doxygenargs[j]==realargs[j])
+                realargs[j].SetArgumentName(doxygenargs[j].GetArgumentName());
+
+        tmp.SetArgumentTypes(realargs);
+    }
+
     // insert the new one
-    file.InsertLine(INDENTATION_STR + api->GetAsString() + ";", start);
+    file.InsertLine(INDENTATION_STR + tmp.GetAsString() + ";", start);
 
     // now save the modification
     if (!file.Write()) {