mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +00:00
Everywhere: Stop using NonnullRefPtrVector
This class had slightly confusing semantics and the added weirdness doesn't seem worth it just so we can say "." instead of "->" when iterating over a vector of NNRPs. This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
This commit is contained in:
parent
104be6c8ac
commit
8a48246ed1
168 changed files with 1280 additions and 1280 deletions
|
@ -32,12 +32,12 @@ ModelIndex TreeViewModel::parent_index(ModelIndex const& index) const
|
|||
return {};
|
||||
if (parent_node->parent_node() == nullptr) {
|
||||
for (size_t row = 0; row < m_nodes.size(); row++)
|
||||
if (m_nodes.ptr_at(row).ptr() == parent_node)
|
||||
if (m_nodes[row] == parent_node)
|
||||
return create_index(static_cast<int>(row), 0, parent_node);
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
for (size_t row = 0; row < parent_node->parent_node()->child_nodes().size(); row++) {
|
||||
auto const* child_node_at_row = parent_node->parent_node()->child_nodes().ptr_at(row).ptr();
|
||||
auto const* child_node_at_row = parent_node->parent_node()->child_nodes()[row].ptr();
|
||||
if (child_node_at_row == parent_node)
|
||||
return create_index(static_cast<int>(row), 0, parent_node);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue