X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=util%2Foperation.hpp;h=13aeeb15f2761717a7b4d89f88a6653cc6db0a70;hb=4db614a7b66e3a293b484f8d853b4f5892d2d1d8;hp=5c8c26edee39f7bc2049bdd8422c0c429749ec8a;hpb=04b8554c3724eae57fbd75dc6b3e69dca8b58187;p=awesomized%2Flibmemcached diff --git a/util/operation.hpp b/util/operation.hpp index 5c8c26ed..13aeeb15 100644 --- a/util/operation.hpp +++ b/util/operation.hpp @@ -39,7 +39,7 @@ #include -#include +#include #include namespace datadifferential { @@ -86,29 +86,7 @@ public: } // Return false on error - bool response(std::string &arg) - { - if (_response.empty()) - return false; - - if (not memcmp("OK\r\n", &_response[0], 3)) - { } - else if (not memcmp("OK ", &_response[0], 3)) - { - arg.append(&_response[3], _response.size() -3); - } - else if (not memcmp("ERR ", &_response[0], 4)) - { - arg.append(&_response[4], _response.size() -4); - return false; - } - else - { - arg.append(&_response[0], _response.size()); - } - - return true; - } + bool response(std::string &); bool reconnect() const {