frontend: Use static_cast when casting from void pointers

Using static_cast is preferred here, as it is safer to use than
reinterpret_cast.
This commit is contained in:
cg2121
2025-01-28 04:28:33 -06:00
committed by Ryan Foster
parent c86de0587a
commit d7cce79d7e
22 changed files with 73 additions and 79 deletions

View File

@@ -256,7 +256,7 @@ void OBSBasicSourceSelect::on_buttonBox_accepted()
obs_scene_t *scene = obs_get_scene_by_name(scene_name);
OBSSceneItem item;
auto cb = [](obs_scene_t *, obs_sceneitem_t *sceneitem, void *data) {
OBSSceneItem &last = *reinterpret_cast<OBSSceneItem *>(data);
OBSSceneItem &last = *static_cast<OBSSceneItem *>(data);
last = sceneitem;
return true;
};