[vlc-devel] [PATCH 2/2] qt: use correct enums in switch case

Marvin Scholz epirat07 at gmail.com
Fri Nov 22 00:53:43 CET 2019


Fix for a enum-compare-switch warning:

warning: comparison of two values with different enumeration types in
switch statement ('PlaylistControllerModel::PlaybackRepeat' and
'vlc_playlist_playback_repeat') [-Wenum-compare-switch]
---
 modules/gui/qt/components/playlist/playlist_controller.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/components/playlist/playlist_controller.cpp b/modules/gui/qt/components/playlist/playlist_controller.cpp
index 11933b3d84..43ad90e5a5 100644
--- a/modules/gui/qt/components/playlist/playlist_controller.cpp
+++ b/modules/gui/qt/components/playlist/playlist_controller.cpp
@@ -537,13 +537,13 @@ void PlaylistControllerModel::toggleRepeatMode()
     vlc_playlist_playback_repeat new_repeat;
     /* Toggle Normal -> Loop -> Repeat -> Normal ... */
     switch ( d->m_repeat ) {
-    case VLC_PLAYLIST_PLAYBACK_REPEAT_NONE:
+    case PlaybackRepeat::PLAYBACK_REPEAT_NONE:
         new_repeat = VLC_PLAYLIST_PLAYBACK_REPEAT_ALL;
         break;
-    case VLC_PLAYLIST_PLAYBACK_REPEAT_ALL:
+    case PlaybackRepeat::PLAYBACK_REPEAT_ALL:
         new_repeat = VLC_PLAYLIST_PLAYBACK_REPEAT_CURRENT;
         break;
-    case VLC_PLAYLIST_PLAYBACK_REPEAT_CURRENT:
+    case PlaybackRepeat::PLAYBACK_REPEAT_CURRENT:
     default:
         new_repeat = VLC_PLAYLIST_PLAYBACK_REPEAT_NONE;
         break;
-- 
2.20.1 (Apple Git-117)



More information about the vlc-devel mailing list