mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-01 13:49:05 +00:00
HackStudio: Add comment about lexicographical insertion to ClassView
This commit is contained in:
parent
c1b2003687
commit
fdaec58f59
Notes:
sideshowbarker
2024-07-18 16:53:45 +09:00
Author: https://github.com/itamar8910
Commit: fdaec58f59
Pull-request: https://github.com/SerenityOS/serenity/pull/7784
Issue: https://github.com/SerenityOS/serenity/issues/7702
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue