MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / sortAllChildren

Method sortAllChildren

Source/Node/Node.cpp:1228–1236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1226}
1227
1228void Node::sortAllChildren() {
1229 if (_children && _flags.isOn(Node::Reorder)) {
1230 auto& data = _children->data();
1231 std::stable_sort(data.begin(), data.end(), [](const Own<Value>& a, const Own<Value>& b) {
1232 return a->to<Node>()->getOrder() < b->to<Node>()->getOrder();
1233 });
1234 _flags.setOff(Node::Reorder);
1235 }
1236}
1237
1238void Node::markReorder() noexcept {
1239 _flags.setOn(Node::Reorder);

Callers

nothing calls this directly

Calls 6

isOnMethod · 0.80
getOrderMethod · 0.80
setOffMethod · 0.80
dataMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected