From: Danny Al-Gaaf Date: Mon, 14 May 2018 20:59:44 +0000 (+0200) Subject: mgr: use static_cast instead of c-style casts X-Git-Tag: v14.0.1~984^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=721335d55bda84552dc343ca1e44578492333a09;p=ceph.git mgr: use static_cast instead of c-style casts Signed-off-by: Danny Al-Gaaf --- diff --git a/src/mgr/BaseMgrModule.cc b/src/mgr/BaseMgrModule.cc index 5ff2aeebb711..64a703136d0b 100644 --- a/src/mgr/BaseMgrModule.cc +++ b/src/mgr/BaseMgrModule.cc @@ -644,11 +644,11 @@ BaseMgrModule_init(BaseMgrModule *self, PyObject *args, PyObject *kwds) return -1; } - self->py_modules = (ActivePyModules*)PyCapsule_GetPointer( - py_modules_capsule, nullptr); + self->py_modules = static_cast(PyCapsule_GetPointer( + py_modules_capsule, nullptr)); assert(self->py_modules); - self->this_module = (ActivePyModule*)PyCapsule_GetPointer( - this_module_capsule, nullptr); + self->this_module = static_cast(PyCapsule_GetPointer( + this_module_capsule, nullptr)); assert(self->this_module); return 0; diff --git a/src/mgr/BaseMgrStandbyModule.cc b/src/mgr/BaseMgrStandbyModule.cc index 468e970359d2..12182f360ccb 100644 --- a/src/mgr/BaseMgrStandbyModule.cc +++ b/src/mgr/BaseMgrStandbyModule.cc @@ -47,8 +47,8 @@ BaseMgrStandbyModule_init(BaseMgrStandbyModule *self, PyObject *args, PyObject * return -1; } - self->this_module = (StandbyPyModule*)PyCapsule_GetPointer( - this_module_capsule, nullptr); + self->this_module = static_cast(PyCapsule_GetPointer( + this_module_capsule, nullptr)); assert(self->this_module); return 0; diff --git a/src/mgr/Mgr.cc b/src/mgr/Mgr.cc index 2acebb4d8c34..d0ef7cd45ebc 100644 --- a/src/mgr/Mgr.cc +++ b/src/mgr/Mgr.cc @@ -495,7 +495,7 @@ bool Mgr::ms_dispatch(Message *m) m->put(); break; case MSG_SERVICE_MAP: - handle_service_map((MServiceMap*)m); + handle_service_map(static_cast(m)); py_module_registry->notify_all("service_map", ""); m->put(); break;