summaryrefslogtreecommitdiff
path: root/src/commands.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-11-01 19:31:13 +0000
committerMaxime Coste <frrrwww@gmail.com>2014-11-01 19:31:13 +0000
commitc04dfc7bb7ea01404c9475c47e710fe12256f17e (patch)
treed27b6fdf1a1818b791f0a5cbe431fbec7965299a /src/commands.cc
parent9a2822e329c7ae448d82734078e38df4ac757655 (diff)
move more parameters from const String& to StringView
Diffstat (limited to 'src/commands.cc')
-rw-r--r--src/commands.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands.cc b/src/commands.cc
index a7d56c07..da755cf6 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -35,7 +35,7 @@ namespace Kakoune
namespace
{
-Buffer* open_fifo(const String& name , const String& filename, bool scroll)
+Buffer* open_fifo(StringView name, StringView filename, bool scroll)
{
int fd = open(parse_filename(filename).c_str(), O_RDONLY);
fcntl(fd, F_SETFD, FD_CLOEXEC);
@@ -44,7 +44,7 @@ Buffer* open_fifo(const String& name , const String& filename, bool scroll)
BufferManager::instance().delete_buffer_if_exists(name);
- return create_fifo_buffer(std::move(name), fd, scroll);
+ return create_fifo_buffer(name, fd, scroll);
}
template<typename T>
@@ -1163,7 +1163,7 @@ const CommandDesc prompt_cmd = {
context.input_handler().prompt(
params[0], std::move(initstr), get_face("Prompt"), Completer{},
- [=](const String& str, PromptEvent event, Context& context)
+ [=](StringView str, PromptEvent event, Context& context)
{
if (event != PromptEvent::Validate)
return;