c++: fix return value type
[awesomized/libmemcached] / libmemcached-1.0 / memcached.hpp
index 4f12e2ec833be1abd86a2deaf2bd3f2d6b94b221..af12f30010608f0699255166199b7e36824a4140 100644 (file)
@@ -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 std::string, std::vector<char> >::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;
@@ -847,7 +845,7 @@ public:
      */
     for (uint32_t x= 0; x < server_count; x++)
     {
-      memcached_server_instance_st instance= memcached_server_instance_by_position(memc_, x);
+      const memcached_instance_st * instance= memcached_server_instance_by_position(memc_, x);
       std::ostringstream strstm;
       std::string server_name(memcached_server_name(instance));
       server_name.append(":");