Update libtest.
[awesomized/libmemcached] / libtest / memcached.hpp
index c4953975817bdf66201aaa5b2cd028ec590d79a5..e0e1485101aaa41c9c7a8593dc379d2ff0b2feab 100644 (file)
@@ -39,7 +39,7 @@
 #if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED
 inline bool operator== (const memcached_st& memc, const memcached_return_t rc)
 {
-  if (memcached_last_error(&memc) == rc)
+  if (memcached_last_error(const_cast<memcached_st *>(&memc)) == rc)
   {
     return true;
   }
@@ -49,7 +49,7 @@ inline bool operator== (const memcached_st& memc, const memcached_return_t rc)
 
 inline bool operator!= (const memcached_st& memc, const memcached_return_t rc)
 {
-  if (memcached_last_error(&memc) != rc)
+  if (memcached_last_error(const_cast<memcached_st *>(&memc)) != rc)
   {
     return true;
   }
@@ -59,7 +59,7 @@ inline bool operator!= (const memcached_st& memc, const memcached_return_t rc)
 
 inline bool operator!= (const memcached_return_t rc, const memcached_st& memc)
 {
-  if (memcached_last_error(&memc) != rc)
+  if (memcached_last_error(const_cast<memcached_st *>(&memc)) != rc)
   {
     return true;
   }