From 1d7a89fee3a8d56db805e7515cee24aaa1fe3036 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Fri, 14 Apr 2017 00:45:39 +0100 Subject: [PATCH] Make Command and IncRedis moveable --- include/incredis/command.hpp | 1 + include/incredis/incredis.hpp | 1 + src/command.cpp | 2 ++ 3 files changed, 4 insertions(+) diff --git a/include/incredis/command.hpp b/include/incredis/command.hpp index 835a1ba..f41a8d3 100644 --- a/include/incredis/command.hpp +++ b/include/incredis/command.hpp @@ -37,6 +37,7 @@ namespace redis { class Command { public: Command ( std::string&& parAddress, uint16_t parPort ); + Command ( Command&& ); explicit Command ( std::string&& parSocket ); ~Command ( void ) noexcept; diff --git a/include/incredis/incredis.hpp b/include/incredis/incredis.hpp index 4f1a7a9..e310c4c 100644 --- a/include/incredis/incredis.hpp +++ b/include/incredis/incredis.hpp @@ -45,6 +45,7 @@ namespace redis { typedef boost::optional> opt_string_list; IncRedis ( std::string&& parAddress, uint16_t parPort ); + IncRedis ( IncRedis&& ) = default; explicit IncRedis ( std::string&& parSocket ); ~IncRedis ( void ) noexcept = default; diff --git a/src/command.cpp b/src/command.cpp index ee99310..64da10e 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -48,6 +48,8 @@ namespace redis { { } + Command::Command (Command&&) = default; + Command::Command (std::string&& parSocket) : Command(std::move(parSocket), 0) {