mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +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
|
@ -59,18 +59,18 @@ public:
|
|||
Node const* parent_node() const { return m_parent_node; }
|
||||
Node* parent_node() { return m_parent_node; }
|
||||
|
||||
NonnullRefPtrVector<Node> const& child_nodes() const { return m_child_nodes; }
|
||||
NonnullRefPtrVector<Node>& child_nodes() { return m_child_nodes; }
|
||||
Vector<NonnullRefPtr<Node>> const& child_nodes() const { return m_child_nodes; }
|
||||
Vector<NonnullRefPtr<Node>>& child_nodes() { return m_child_nodes; }
|
||||
|
||||
private:
|
||||
DeprecatedString m_text;
|
||||
Optional<Icon> m_icon;
|
||||
WeakPtr<Node> m_parent_node;
|
||||
NonnullRefPtrVector<Node> m_child_nodes;
|
||||
Vector<NonnullRefPtr<Node>> m_child_nodes;
|
||||
};
|
||||
|
||||
NonnullRefPtrVector<Node> const& nodes() const { return m_nodes; }
|
||||
NonnullRefPtrVector<Node>& nodes() { return m_nodes; }
|
||||
Vector<NonnullRefPtr<Node>> const& nodes() const { return m_nodes; }
|
||||
Vector<NonnullRefPtr<Node>>& nodes() { return m_nodes; }
|
||||
|
||||
template<typename NodeType = Node, typename... Args>
|
||||
NonnullRefPtr<NodeType> add_node(DeprecatedString text, Optional<Icon> icon, Args&&... args)
|
||||
|
@ -86,7 +86,7 @@ public:
|
|||
private:
|
||||
TreeViewModel() = default;
|
||||
|
||||
NonnullRefPtrVector<Node> m_nodes;
|
||||
Vector<NonnullRefPtr<Node>> m_nodes;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue