return rctx;
}
void destroy_context(void *ctx) {
- delete (RGWRadosCtx *)ctx;
+ delete static_cast<RGWRadosCtx *>(ctx);
}
void set_atomic(void *ctx, rgw_obj& obj) {
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
rctx->set_atomic(obj);
}
void set_prefetch_data(void *ctx, rgw_obj& obj) {
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
rctx->set_prefetch_data(obj);
}
// to notify upper layer that we need to do some operation on an object, and it's up to
// the upper layer to schedule this operation.. e.g., log intent in intent log
void set_intent_cb(void *ctx, int (*cb)(RGWRados *store, void *user_ctx, rgw_obj& obj, RGWIntentEvent intent)) {
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
rctx->set_intent_cb(cb);
}