UI,libobs,libobs-opengl,obs-ffmpeg: Remove unneeded cast in switches

Those casts were usually used to workaround switch warnings.

Also adds default to OBS frontend event switches that had this
workaround.
This commit is contained in:
tytan652 committed 2023-01-16 11:52:26 +01:00
1 parent 9cde3c302c
commit cf5c68b773
6 files changed
+10 -6

No files matched your search

+3 -1
View File
@@ -22,13 +22,15 @@ void OBSBasicStats::OBSFrontendEvent(enum obs_frontend_event event, void *ptr)
{
OBSBasicStats *stats = reinterpret_cast<OBSBasicStats *>(ptr);
switch ((int)event) {
switch (event) {
case OBS_FRONTEND_EVENT_RECORDING_STARTED:
stats->StartRecTimeLeft();
break;
case OBS_FRONTEND_EVENT_RECORDING_STOPPED:
stats->ResetRecTimeLeft();
break;
default:
break;
}
}