mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-27 19:02:02 -04:00
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:
@@ -14,7 +14,7 @@ static inline OBSScene GetCurrentScene()
|
||||
|
||||
void SourceTreeModel::OBSFrontendEvent(enum obs_frontend_event event, void *ptr)
|
||||
{
|
||||
SourceTreeModel *stm = reinterpret_cast<SourceTreeModel *>(ptr);
|
||||
SourceTreeModel *stm = static_cast<SourceTreeModel *>(ptr);
|
||||
|
||||
switch (event) {
|
||||
case OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED:
|
||||
@@ -43,7 +43,7 @@ void SourceTreeModel::Clear()
|
||||
|
||||
static bool enumItem(obs_scene_t *, obs_sceneitem_t *item, void *ptr)
|
||||
{
|
||||
QVector<OBSSceneItem> &items = *reinterpret_cast<QVector<OBSSceneItem> *>(ptr);
|
||||
QVector<OBSSceneItem> &items = *static_cast<QVector<OBSSceneItem> *>(ptr);
|
||||
|
||||
obs_source_t *src = obs_sceneitem_get_source(item);
|
||||
if (obs_source_removed(src)) {
|
||||
|
||||
Reference in New Issue
Block a user