]> git.saurik.com Git - wxWidgets.git/commitdiff
fix bug in buliding newtype string; fix GetAsString() to put proper spaces around...
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Mon, 24 Mar 2008 00:51:00 +0000 (00:51 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Mon, 24 Mar 2008 00:51:00 +0000 (00:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

utils/ifacecheck/src/xmlparser.cpp

index d5513341f61bf2da17c32232b3a001c0e655b859..78a12e8196c1344987119eadb0ba438336c60041 100644 (file)
@@ -177,11 +177,11 @@ wxString wxMethod::GetAsString() const
         ret += m_args[i].GetAsString();
         if (!m_argDefaults[i].IsEmpty())
             ret += " = " + m_argDefaults[i];
         ret += m_args[i].GetAsString();
         if (!m_argDefaults[i].IsEmpty())
             ret += " = " + m_argDefaults[i];
-        ret += ",";
+        ret += ", ";
     }
 
     if (m_args.GetCount()>0)
     }
 
     if (m_args.GetCount()>0)
-        ret.RemoveLast();
+        ret = ret.Left(ret.Len()-2);
 
     ret += ")";
 
 
     ret += ")";
 
@@ -192,8 +192,9 @@ wxString wxMethod::GetAsString() const
     if (m_bVirtual)
         ret = "virtual " + ret;
 
     if (m_bVirtual)
         ret = "virtual " + ret;
 
-    if (m_bDeprecated)
-        ret = "wxDEPRECATED( " + ret + " )";
+    // in doxygen headers we don't need wxDEPRECATED:
+    //if (m_bDeprecated)
+    //    ret = "wxDEPRECATED( " + ret + " )";
 
     return ret;
 }
 
     return ret;
 }
@@ -629,17 +630,18 @@ bool wxXmlGccInterface::Parse(const wxString& filename)
             {
                 // this to-resolve-type references a "primary" type
 
             {
                 // this to-resolve-type references a "primary" type
 
-                wxString newtype;
+                wxString newtype = primary->second;
                 int attribs = i->second.attribs;
 
                 int attribs = i->second.attribs;
 
+                // attribs may contain a combination of ATTRIB_* flags:
                 if (attribs & ATTRIB_CONST)
                 if (attribs & ATTRIB_CONST)
-                    newtype = "const " + primary->second;
+                    newtype = "const " + newtype;
                 if (attribs & ATTRIB_REFERENCE)
                 if (attribs & ATTRIB_REFERENCE)
-                    newtype = primary->second + "&";
+                    newtype = newtype + "&";
                 if (attribs & ATTRIB_POINTER)
                 if (attribs & ATTRIB_POINTER)
-                    newtype = primary->second + "*";
+                    newtype = newtype + "*";
                 if (attribs & ATTRIB_ARRAY)
                 if (attribs & ATTRIB_ARRAY)
-                    newtype = primary->second + "[]";
+                    newtype = newtype + "[]";
 
                 // add the resolved type to the list of "primary" types
                 types[id] = newtype;
 
                 // add the resolved type to the list of "primary" types
                 types[id] = newtype;
@@ -1088,6 +1090,7 @@ bool wxXmlDoxygenInterface::ParseMethod(const wxXmlNode* p, wxMethod& m, wxStrin
         }
         else if (child->GetName() == "location")
         {
         }
         else if (child->GetName() == "location")
         {
+            line = -1;
             if (child->GetAttribute("line").ToLong(&line))
                 m.SetLocation((int)line);
             header = child->GetAttribute("file");
             if (child->GetAttribute("line").ToLong(&line))
                 m.SetLocation((int)line);
             header = child->GetAttribute("file");