summaryrefslogtreecommitdiff
path: root/src/command_manager.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-03-09 13:48:41 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-03-09 13:54:09 +0000
commit1cec8df45e297a8136df6f293d4874ae6c6cb013 (patch)
tree7d713ba554765093238c924bcc9a6eaf7bf240ec /src/command_manager.hh
parent44f81d0b8b73367369de6be0757247a62876d4c1 (diff)
ArrayView content is not const anymore
As in upcoming std c++ array_view, ArrayView<T> points to mutable data, use ArrayView<const T> or alias ConstArrayView<T> for const data.
Diffstat (limited to 'src/command_manager.hh')
-rw-r--r--src/command_manager.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/command_manager.hh b/src/command_manager.hh
index 3226449e..46afac26 100644
--- a/src/command_manager.hh
+++ b/src/command_manager.hh
@@ -18,7 +18,7 @@ namespace Kakoune
{
class Context;
-using CommandParameters = ArrayView<String>;
+using CommandParameters = ConstArrayView<String>;
using Command = std::function<void (const ParametersParser& parser, Context& context)>;
using CommandCompleter = std::function<Completions (const Context& context,
CompletionFlags,
@@ -40,7 +40,7 @@ public:
using ArgumentCompleter = std::function<Completions (const Context&,
CompletionFlags flags,
const String&, ByteCount)>;
- using ArgumentCompleterList = ArrayView<ArgumentCompleter>;
+ using ArgumentCompleterList = ConstArrayView<ArgumentCompleter>;
PerArgumentCommandCompleter(ArgumentCompleterList completers)
: m_completers(completers.begin(), completers.end()) {}
@@ -61,7 +61,7 @@ class CommandManager : public Singleton<CommandManager>
{
public:
void execute(StringView command_line, Context& context,
- ArrayView<String> shell_params = {},
+ ConstArrayView<String> shell_params = {},
const EnvVarMap& env_vars = EnvVarMap{});
Completions complete(const Context& context, CompletionFlags flags,