[vlc-commits] qt: use correct enums in switch case

Marvin Scholz git at videolan.org
Mon Dec 9 16:34:58 CET 2019


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Fri Nov 22 00:53:23 2019 +0100| [2374b642fd61f315af149ad696bf3a4fcd7e82e5] | committer: Marvin Scholz

qt: use correct enums in switch case

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]

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2374b642fd61f315af149ad696bf3a4fcd7e82e5
---

 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;



More information about the vlc-commits mailing list