summaryrefslogtreecommitdiff
path: root/src/utils/copynpaste.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-08 22:44:39 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-08 22:44:39 +0300
commita61ac4664d55cddb18d2d861e76629bd07676129 (patch)
tree59f5ba3ff7e65bbe94651db9ad2cf68b847d8f96 /src/utils/copynpaste.cpp
parentbb3a85b045a6135f7228023a7ba55fb1c9e6bd90 (diff)
downloadmv-a61ac4664d55cddb18d2d861e76629bd07676129.tar.gz
mv-a61ac4664d55cddb18d2d861e76629bd07676129.tar.bz2
mv-a61ac4664d55cddb18d2d861e76629bd07676129.tar.xz
mv-a61ac4664d55cddb18d2d861e76629bd07676129.zip
Add some missing const.
Diffstat (limited to 'src/utils/copynpaste.cpp')
-rw-r--r--src/utils/copynpaste.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/utils/copynpaste.cpp b/src/utils/copynpaste.cpp
index 8a413c1f7..8bce3a4c0 100644
--- a/src/utils/copynpaste.cpp
+++ b/src/utils/copynpaste.cpp
@@ -59,7 +59,7 @@ bool retrieveBuffer(std::string& text, size_t& pos)
return false;
}
-bool sendBuffer(std::string& text)
+bool sendBuffer(const std::string &restrict text)
{
return !SDL_SetClipboardText(text.c_str());
}
@@ -120,7 +120,7 @@ bool retrieveBuffer(std::string& text, size_t& pos)
return ret;
}
-bool sendBuffer(std::string& text)
+bool sendBuffer(const std::string &restrict text)
{
const int wCharsLen = MultiByteToWideChar(CP_UTF8,
0, text.c_str(), -1, nullptr, 0);
@@ -293,7 +293,7 @@ bool retrieveBuffer(std::string& text, size_t& pos)
}
}
-bool sendBuffer(std::string& text)
+bool sendBuffer(const std::string &restrict text)
{
return false;
}
@@ -402,17 +402,17 @@ bool retrieveBuffer(std::string& text, size_t& pos)
return false;
}
-static bool runxsel(std::string& text, const char *p1,
+static bool runxsel(const std::string &text, const char *p1,
const char *p2 = nullptr);
-bool sendBuffer(std::string& text)
+bool sendBuffer(const std::string &restrict text)
{
runxsel(text, "-i");
runxsel(text, "-b", "-i");
return true;
}
-static bool runxsel(std::string& text, const char *p1, const char *p2)
+static bool runxsel(const std::string &text, const char *p1, const char *p2)
{
pid_t pid;
int fd[2];
@@ -484,7 +484,7 @@ bool retrieveBuffer(std::string& text, size_t& pos)
return true;
}
-bool sendBuffer(std::string& text)
+bool sendBuffer(const std::string &restrict text)
{
naclPostMessage("clipboard-copy", text);
return true;
@@ -495,7 +495,7 @@ bool retrieveBuffer(std::string&, size_t&)
return false;
}
-bool sendBuffer(std::string& text A_UNUSED)
+bool sendBuffer(const std::string &restrict text A_UNUSED)
{
return false;
}