summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/TextDocument.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-03-06 17:16:25 +0100
committerAndreas Kling <kling@serenityos.org>2023-03-06 23:46:35 +0100
commit359d6e7b0b0ef7add9eb2015d0dd664a82cf73d7 (patch)
treebe51963e0f0dc7e1eeeb670188c8fe1fa5eea37f /Userland/Libraries/LibGUI/TextDocument.h
parent689ca370d4eca80eb5c3856a69c3eed4ed848a29 (diff)
downloadserenity-359d6e7b0b0ef7add9eb2015d0dd664a82cf73d7.zip
Everywhere: Stop using NonnullOwnPtrVector
Same as NonnullRefPtrVector: weird semantics, questionable benefits.
Diffstat (limited to 'Userland/Libraries/LibGUI/TextDocument.h')
-rw-r--r--Userland/Libraries/LibGUI/TextDocument.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibGUI/TextDocument.h b/Userland/Libraries/LibGUI/TextDocument.h
index a79073b7d9..f6c16f7a74 100644
--- a/Userland/Libraries/LibGUI/TextDocument.h
+++ b/Userland/Libraries/LibGUI/TextDocument.h
@@ -70,15 +70,15 @@ public:
virtual ~TextDocument() = default;
size_t line_count() const { return m_lines.size(); }
- TextDocumentLine const& line(size_t line_index) const { return m_lines[line_index]; }
- TextDocumentLine& line(size_t line_index) { return m_lines[line_index]; }
+ TextDocumentLine const& line(size_t line_index) const { return *m_lines[line_index]; }
+ TextDocumentLine& line(size_t line_index) { return *m_lines[line_index]; }
void set_spans(u32 span_collection_index, Vector<TextDocumentSpan> spans);
bool set_text(StringView, AllowCallback = AllowCallback::Yes);
- NonnullOwnPtrVector<TextDocumentLine> const& lines() const { return m_lines; }
- NonnullOwnPtrVector<TextDocumentLine>& lines() { return m_lines; }
+ Vector<NonnullOwnPtr<TextDocumentLine>> const& lines() const { return m_lines; }
+ Vector<NonnullOwnPtr<TextDocumentLine>>& lines() { return m_lines; }
bool has_spans() const { return !m_spans.is_empty(); }
Vector<TextDocumentSpan>& spans() { return m_spans; }
@@ -163,7 +163,7 @@ protected:
private:
void merge_span_collections();
- NonnullOwnPtrVector<TextDocumentLine> m_lines;
+ Vector<NonnullOwnPtr<TextDocumentLine>> m_lines;
HashMap<u32, Vector<TextDocumentSpan>> m_span_collections;
Vector<TextDocumentSpan> m_spans;
Vector<TextDocumentFoldingRegion> m_folding_regions;