From 1cec8df45e297a8136df6f293d4874ae6c6cb013 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 9 Mar 2015 13:48:41 +0000 Subject: ArrayView content is not const anymore As in upcoming std c++ array_view, ArrayView points to mutable data, use ArrayView or alias ConstArrayView for const data. --- src/input_handler.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/input_handler.cc') diff --git a/src/input_handler.cc b/src/input_handler.cc index 2f67953b..23717f88 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -342,7 +342,7 @@ private: class Menu : public InputMode { public: - Menu(InputHandler& input_handler, ArrayView choices, + Menu(InputHandler& input_handler, ConstArrayView choices, MenuCallback callback) : InputMode(input_handler), m_callback(callback), m_choices(choices.begin(), choices.end()), @@ -460,7 +460,7 @@ private: LineEditor m_filter_editor; }; -String common_prefix(ArrayView strings) +String common_prefix(ConstArrayView strings) { String res; if (strings.empty()) @@ -928,7 +928,7 @@ private: selections.sort_and_merge_overlapping(); } - void insert(ArrayView strings) + void insert(ConstArrayView strings) { context().selections().insert(strings, InsertMode::InsertCursor); } @@ -1096,7 +1096,7 @@ void InputHandler::set_prompt_face(Face prompt_face) prompt->set_prompt_face(prompt_face); } -void InputHandler::menu(ArrayView choices, +void InputHandler::menu(ConstArrayView choices, MenuCallback callback) { change_input_mode(new InputModes::Menu(*this, choices, callback)); @@ -1153,7 +1153,7 @@ bool InputHandler::is_recording() const void InputHandler::stop_recording() { kak_assert(m_recording_reg != 0); - RegisterManager::instance()[m_recording_reg] = ArrayView(m_recorded_keys); + RegisterManager::instance()[m_recording_reg] = ConstArrayView(m_recorded_keys); m_recording_reg = 0; } -- cgit v1.2.3