RedisWriter#RedisGet(): std::move() query

refs #49
This commit is contained in:
Alexander A. Klimov 2019-07-25 18:03:42 +02:00 committed by Michael Friedrich
parent fb98d3edef
commit 53d04cc4e8
2 changed files with 4 additions and 4 deletions

View File

@ -408,11 +408,11 @@ struct RedisReplyDeleter
}
};
std::shared_ptr<redisReply> RedisWriter::RedisGet(const std::vector<String>& query) {
std::shared_ptr<redisReply> RedisWriter::RedisGet(std::vector<String> query) {
auto *wait = new synchronousWait;
wait->ready = false;
m_Rcon->ExecuteQuery(query, RedisQueryCallback, wait);
m_Rcon->ExecuteQuery(std::move(query), RedisQueryCallback, wait);
boost::mutex::scoped_lock lock(wait->mtx);
while (!wait->ready) {
@ -422,4 +422,4 @@ std::shared_ptr<redisReply> RedisWriter::RedisGet(const std::vector<String>& que
}
return std::shared_ptr<redisReply>(wait->reply, RedisReplyDeleter());
}
}

View File

@ -115,7 +115,7 @@ private:
void ExceptionHandler(boost::exception_ptr exp);
//Used to get a reply from the asyncronous connection
std::shared_ptr<redisReply> RedisGet(const std::vector<String>& query);
std::shared_ptr<redisReply> RedisGet(std::vector<String> query);
static void RedisQueryCallback(redisAsyncContext *c, void *r, void *p);
static redisReply* dupReplyObject(redisReply* reply);