Skip to content

Commit

Permalink
mgr: use static_cast instead of c-style casts
Browse files Browse the repository at this point in the history
Signed-off-by: Danny Al-Gaaf <[email protected]>
  • Loading branch information
dalgaaf committed Jun 12, 2018
1 parent 58a878e commit 721335d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/mgr/BaseMgrModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ActivePyModules*>(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<ActivePyModule*>(PyCapsule_GetPointer(
this_module_capsule, nullptr));
assert(self->this_module);

return 0;
Expand Down
4 changes: 2 additions & 2 deletions src/mgr/BaseMgrStandbyModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<StandbyPyModule*>(PyCapsule_GetPointer(
this_module_capsule, nullptr));
assert(self->this_module);

return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/mgr/Mgr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<MServiceMap*>(m));
py_module_registry->notify_all("service_map", "");
m->put();
break;
Expand Down

0 comments on commit 721335d

Please sign in to comment.