Browse Source

BindingGenerator: small changes in comments

1vanK 4 years ago
parent
commit
5aa443ae89

+ 3 - 4
Source/Tools/BindingGenerator/XmlSourceData.cpp

@@ -53,7 +53,7 @@ static void LoadXml(const string& fullPath)
 
     xml_node doxygenindex = xmlDocument->child("doxygenindex");
     
-    if (doxygenindex) // index.xml
+    if (doxygenindex) // Only index.xml has doxygenindex child
     {
         // Fill defines_
         for (xml_node compound : doxygenindex.children("compound"))
@@ -82,9 +82,8 @@ static void LoadXml(const string& fullPath)
 
     if (compounddef_kind == "struct" || compounddef_kind == "class")
     {
-        // Fill classes_
-        string id = compounddef.attribute("id").value();
-        assert(!id.empty());
+        // Fill classesByID_
+        string id = ExtractID(compounddef);
         SourceData::classesByID_.insert({ id, compounddef });
 
         // Fill classesByName_

+ 1 - 1
Source/Tools/BindingGenerator/XmlSourceData.h

@@ -41,7 +41,7 @@ namespace SourceData
     // All enums from Urho3D namepace
     extern std::unordered_map<std::string, pugi::xml_node> enums_; // name -> memberdef
 
-    // List of all defines. Used to detect that some function is a define actually
+    // List of all defines. Used to detect that some function is a #define actually
     extern std::vector<std::string> defines_;
 
     // Namespace Urho3D contains enums, global functions and global variables