From 11c51e84850335af0027bb9a859730427e758e4f Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Sat, 20 Jul 2013 19:13:15 +0200 Subject: [PATCH] rgw/rgw_metadata.cc: use static_cast<>() instead of C-Style cast Signed-off-by: Danny Al-Gaaf --- src/rgw/rgw_metadata.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rgw/rgw_metadata.cc b/src/rgw/rgw_metadata.cc index 7be73e6ca0cf2..ac8c703f5e056 100644 --- a/src/rgw/rgw_metadata.cc +++ b/src/rgw/rgw_metadata.cc @@ -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(handle); delete ctx; } @@ -112,7 +112,7 @@ int RGWMetadataLog::list_entries(void *handle, int max_entries, list& entries, bool *truncated) { - LogListCtx *ctx = (LogListCtx *)handle; + LogListCtx *ctx = static_cast(handle); if (!max_entries) { *truncated = false; @@ -210,7 +210,7 @@ public: return 0; } virtual int list_keys_next(void *handle, int max, list& keys, bool *truncated) { - iter_data *data = (iter_data *)handle; + iter_data *data = static_cast(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(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& keys, bool *truncated) { - list_keys_handle *h = (list_keys_handle *)handle; + list_keys_handle *h = static_cast(handle); RGWMetadataHandler *handler = h->handler; @@ -461,7 +461,7 @@ int RGWMetadataManager::list_keys_next(void *handle, int max, list& keys void RGWMetadataManager::list_keys_complete(void *handle) { - list_keys_handle *h = (list_keys_handle *)handle; + list_keys_handle *h = static_cast(handle); RGWMetadataHandler *handler = h->handler; -- 2.39.5