diff options
author | Andreas Kling <kling@serenityos.org> | 2023-03-06 14:17:01 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-03-06 23:46:35 +0100 |
commit | 8a48246ed1a93983668a25f5b9b0af0e745e3f04 (patch) | |
tree | dd98425d119f79e0160bf19951f96a4a30276cbb /Userland/Applications/Mail/AccountHolder.h | |
parent | 104be6c8ace8d56f66a89b570cdd615e74d22aa8 (diff) | |
download | serenity-8a48246ed1a93983668a25f5b9b0af0e745e3f04.zip |
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>>.
Diffstat (limited to 'Userland/Applications/Mail/AccountHolder.h')
-rw-r--r-- | Userland/Applications/Mail/AccountHolder.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Applications/Mail/AccountHolder.h b/Userland/Applications/Mail/AccountHolder.h index 91a4cb6259..66e721710e 100644 --- a/Userland/Applications/Mail/AccountHolder.h +++ b/Userland/Applications/Mail/AccountHolder.h @@ -34,7 +34,7 @@ public: m_mailboxes.append(move(mailbox)); } - NonnullRefPtrVector<MailboxNode> const& mailboxes() const { return m_mailboxes; } + Vector<NonnullRefPtr<MailboxNode>> const& mailboxes() const { return m_mailboxes; } DeprecatedString const& name() const { return m_name; } private: @@ -44,7 +44,7 @@ private: } DeprecatedString m_name; - NonnullRefPtrVector<MailboxNode> m_mailboxes; + Vector<NonnullRefPtr<MailboxNode>> m_mailboxes; }; class MailboxNode final : public BaseNode { @@ -66,7 +66,7 @@ public: void set_parent(NonnullRefPtr<MailboxNode> parent) { m_parent = parent; } bool has_children() const { return !m_children.is_empty(); } - NonnullRefPtrVector<MailboxNode> const& children() const { return m_children; } + Vector<NonnullRefPtr<MailboxNode>> const& children() const { return m_children; } void add_child(NonnullRefPtr<MailboxNode> child) { m_children.append(child); } private: @@ -81,7 +81,7 @@ private: IMAP::ListItem m_mailbox; DeprecatedString m_display_name; - NonnullRefPtrVector<MailboxNode> m_children; + Vector<NonnullRefPtr<MailboxNode>> m_children; RefPtr<MailboxNode> m_parent; }; @@ -96,7 +96,7 @@ public: void add_account_with_name_and_mailboxes(DeprecatedString, Vector<IMAP::ListItem> const&); - NonnullRefPtrVector<AccountNode> const& accounts() const { return m_accounts; } + Vector<NonnullRefPtr<AccountNode>> const& accounts() const { return m_accounts; } MailboxTreeModel& mailbox_tree_model() { return *m_mailbox_tree_model; } private: @@ -104,6 +104,6 @@ private: void rebuild_tree(); - NonnullRefPtrVector<AccountNode> m_accounts; + Vector<NonnullRefPtr<AccountNode>> m_accounts; RefPtr<MailboxTreeModel> m_mailbox_tree_model; }; |