]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_metadata.cc: use static_cast<>() instead of C-Style cast
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sat, 20 Jul 2013 17:13:15 +0000 (19:13 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sat, 20 Jul 2013 17:30:04 +0000 (19:30 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rgw/rgw_metadata.cc

index 7be73e6ca0cf20df113d56451049accbb5119eee..ac8c703f5e0567e7ea2beea5bd609e19cb188a19 100644 (file)
@@ -104,7 +104,7 @@ void RGWMetadataLog::init_list_entries(int shard_id, utime_t& from_time, utime_t
 }
 
 void RGWMetadataLog::complete_list_entries(void *handle) {
-  LogListCtx *ctx = (LogListCtx *)handle;
+  LogListCtx *ctx = static_cast<LogListCtx *>(handle);
   delete ctx;
 }
 
@@ -112,7 +112,7 @@ int RGWMetadataLog::list_entries(void *handle,
                  int max_entries,
                  list<cls_log_entry>& entries, 
                  bool *truncated) {
-  LogListCtx *ctx = (LogListCtx *)handle;
+  LogListCtx *ctx = static_cast<LogListCtx *>(handle);
 
   if (!max_entries) {
     *truncated = false;
@@ -210,7 +210,7 @@ public:
     return 0;
   }
   virtual int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated)  {
-    iter_data *data = (iter_data *)handle;
+    iter_data *data = static_cast<iter_data *>(handle);
     for (int i = 0; i < max && data->iter != data->sections.end(); ++i, ++(data->iter)) {
       keys.push_back(*data->iter);
     }
@@ -220,7 +220,7 @@ public:
     return 0;
   }
   virtual void list_keys_complete(void *handle) {
-    iter_data *data = (iter_data *)handle;
+    iter_data *data = static_cast<iter_data *>(handle);
 
     delete data;
   }
@@ -451,7 +451,7 @@ int RGWMetadataManager::list_keys_init(string& section, void **handle)
 
 int RGWMetadataManager::list_keys_next(void *handle, int max, list<string>& keys, bool *truncated)
 {
-  list_keys_handle *h = (list_keys_handle *)handle;
+  list_keys_handle *h = static_cast<list_keys_handle *>(handle);
 
   RGWMetadataHandler *handler = h->handler;
 
@@ -461,7 +461,7 @@ int RGWMetadataManager::list_keys_next(void *handle, int max, list<string>& keys
 
 void RGWMetadataManager::list_keys_complete(void *handle)
 {
-  list_keys_handle *h = (list_keys_handle *)handle;
+  list_keys_handle *h = static_cast<list_keys_handle *>(handle);
 
   RGWMetadataHandler *handler = h->handler;