Przeglądaj źródła

HackStudio: Add comment about lexicographical insertion to ClassView

Itamar 4 lat temu
rodzic
commit
fdaec58f59
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      Userland/DevTools/HackStudio/ClassViewWidget.cpp

+ 1 - 0
Userland/DevTools/HackStudio/ClassViewWidget.cpp

@@ -117,6 +117,7 @@ static ClassViewNode& add_child_node(NonnullOwnPtrVector<ClassViewNode>& childre
 
     size_t inserted_index = 0;
     ClassViewNode& node = *node_ptr;
+    // Insert into parent's children list, sorted lexicographically by name.
     children.insert_before_matching(
         move(node_ptr), [&node](auto& other_node) {
             return strncmp(node.name.characters_without_null_termination(), other_node->name.characters_without_null_termination(), min(node.name.length(), other_node->name.length())) < 0;