From: Danny Al-Gaaf Date: Sat, 20 Jul 2013 17:13:15 +0000 (+0200) Subject: rgw/rgw_metadata.cc: use static_cast<>() instead of C-Style cast X-Git-Tag: v0.67-rc1~10^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=11c51e84850335af0027bb9a859730427e758e4f;p=ceph.git rgw/rgw_metadata.cc: use static_cast<>() instead of C-Style cast Signed-off-by: Danny Al-Gaaf --- diff --git a/src/rgw/rgw_metadata.cc b/src/rgw/rgw_metadata.cc index 7be73e6ca0cf..ac8c703f5e05 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;