X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=libmemcached-1.0%2Fmemcached.hpp;h=af12f30010608f0699255166199b7e36824a4140;hb=1be11f8bb8fdf368985d9e1c900b250541dc4791;hp=6500c0abc2b98df44a3b7971284a309be3282676;hpb=28d3641c8331dfe348a119c6eb4bd776c526da48;p=awesomized%2Flibmemcached diff --git a/libmemcached-1.0/memcached.hpp b/libmemcached-1.0/memcached.hpp index 6500c0ab..af12f300 100644 --- a/libmemcached-1.0/memcached.hpp +++ b/libmemcached-1.0/memcached.hpp @@ -399,7 +399,7 @@ public: { memcached_return_t rc= memcached_set(memc_, key.c_str(), key.length(), - &value[0], value.size(), + value.data(), value.size(), expiration, flags); return memcached_success(rc); } @@ -485,13 +485,11 @@ public: time_t expiration, uint32_t flags) { - bool retval= true; std::map >::const_iterator it= key_value_map.begin(); while (it != key_value_map.end()) { - retval= set(it->first, it->second, expiration, flags); - if (retval == false) + if (!set(it->first, it->second, expiration, flags)) { // We should tell the user what the key that failed was return false;