summaryrefslogtreecommitdiff
path: root/Userland/DevTools
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-06-04 19:45:40 +0300
committerAndreas Kling <kling@serenityos.org>2021-06-04 19:29:22 +0200
commitfdaec58f594b6fac7a64913ca454337f102fd41b (patch)
tree8ea8e753433207e797febb22f7ce17e9228a9b48 /Userland/DevTools
parentc1b20036877fe43e86ca8803994a5477546bf289 (diff)
downloadserenity-fdaec58f594b6fac7a64913ca454337f102fd41b.zip
HackStudio: Add comment about lexicographical insertion to ClassView
Diffstat (limited to 'Userland/DevTools')
-rw-r--r--Userland/DevTools/HackStudio/ClassViewWidget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/DevTools/HackStudio/ClassViewWidget.cpp b/Userland/DevTools/HackStudio/ClassViewWidget.cpp
index acf180e57c..d620897308 100644
--- a/Userland/DevTools/HackStudio/ClassViewWidget.cpp
+++ b/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;