From 2196f17c107d9367d6035da53d955b7382594f1e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 24 Jul 2019 09:12:23 +0200 Subject: LibGUI: Convert Vector to NonnullOwnPtrVector. This is turning out really nice so far. :^) --- Libraries/LibGUI/GTextEditor.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Libraries/LibGUI/GTextEditor.h') diff --git a/Libraries/LibGUI/GTextEditor.h b/Libraries/LibGUI/GTextEditor.h index 751b6a5428..fcac07ab15 100644 --- a/Libraries/LibGUI/GTextEditor.h +++ b/Libraries/LibGUI/GTextEditor.h @@ -2,8 +2,9 @@ #include #include -#include +#include #include +#include class GAction; class GMenu; @@ -193,8 +194,8 @@ private: void update_cursor(); void set_cursor(int line, int column); void set_cursor(const GTextPosition&); - Line& current_line() { return *m_lines[m_cursor.line()]; } - const Line& current_line() const { return *m_lines[m_cursor.line()]; } + Line& current_line() { return m_lines[m_cursor.line()]; } + const Line& current_line() const { return m_lines[m_cursor.line()]; } GTextPosition text_position_at(const Point&) const; void insert_at_cursor(char); void insert_at_cursor(const StringView&); @@ -208,7 +209,7 @@ private: Type m_type { MultiLine }; - Vector> m_lines; + NonnullOwnPtrVector m_lines; GTextPosition m_cursor; TextAlignment m_text_alignment { TextAlignment::CenterLeft }; bool m_cursor_state { true }; -- cgit v1.2.3