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-05-05 20:47:10 -04:00
committed by Ryan Foster
parent c86de0587a
commit d7cce79d7e
22 changed files with 73 additions and 79 deletions
+2 -2
View File
@@ -313,7 +313,7 @@ void SourceTree::dropEvent(QDropEvent *event)
using insertCollapsed_t = decltype(insertCollapsed);
auto preInsertCollapsed = [](obs_scene_t *, obs_sceneitem_t *item, void *param) {
(*reinterpret_cast<insertCollapsed_t *>(param))(item);
(*static_cast<insertCollapsed_t *>(param))(item);
return true;
};
@@ -373,7 +373,7 @@ void SourceTree::dropEvent(QDropEvent *event)
using updateScene_t = decltype(updateScene);
auto preUpdateScene = [](void *data, obs_scene_t *) {
(*reinterpret_cast<updateScene_t *>(data))();
(*static_cast<updateScene_t *>(data))();
};
ignoreReorder = true;