summaryrefslogtreecommitdiff
path: root/mg_playlist.c
diff options
context:
space:
mode:
authorlvw <lvw@e10066b5-e1e2-0310-b819-94efdf66514b>2004-10-06 19:40:18 +0000
committerlvw <lvw@e10066b5-e1e2-0310-b819-94efdf66514b>2004-10-06 19:40:18 +0000
commitbd285704d7cc8eb24725ee1af3a48c2ee18fa27b (patch)
tree8e4aa417023828b8572b4c426f414bbd1a7c0d04 /mg_playlist.c
parent53564f64951ace9983bf1afe6c13f7d07a220435 (diff)
downloadvdr-plugin-muggle-bd285704d7cc8eb24725ee1af3a48c2ee18fa27b.tar.gz
vdr-plugin-muggle-bd285704d7cc8eb24725ee1af3a48c2ee18fa27b.tar.bz2
Removed compiler warnings and some errors
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@206 e10066b5-e1e2-0310-b819-94efdf66514b
Diffstat (limited to 'mg_playlist.c')
-rw-r--r--mg_playlist.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mg_playlist.c b/mg_playlist.c
index a0fbb0f..988f35d 100644
--- a/mg_playlist.c
+++ b/mg_playlist.c
@@ -95,14 +95,14 @@ void mgPlaylist::insert( mgContentItem* item, unsigned int position )
}
}
-bool mgPlaylist::remove( unsigned int pos )
+bool mgPlaylist::remove( int pos )
{
bool result = false;
- if( pos != m_current_idx )
+ if( pos > 0 && pos != m_current_idx )
{
result = mgTracklist::remove( pos );
-
+
if( result && pos < m_current_idx )
{
m_current_idx --;
@@ -176,7 +176,7 @@ mgContentItem* mgPlaylist::getCurrent()
{
mgContentItem *result;
- if( 0 <= m_current_idx && m_current_idx < m_list.size() )
+ if( 0 <= m_current_idx && m_current_idx < (int) m_list.size() )
{
result = *( m_list.begin() + m_current_idx );
}
@@ -207,7 +207,7 @@ bool mgPlaylist::skipFwd()
{
bool result = false;
- if( m_current_idx + 1 < m_list.size() ) // unless loop mode
+ if( m_current_idx + 1 < (int) m_list.size() ) // unless loop mode
{
m_current_idx ++;
result = true;
@@ -235,7 +235,7 @@ bool mgPlaylist::skipBack()
// get next track, do not update data structures
mgContentItem* mgPlaylist::sneakNext()
{
- if( m_current_idx + 1 <= m_list.size() ) // unless loop mode
+ if( m_current_idx + 1 <= (int) m_list.size() ) // unless loop mode
{
return *(m_list.begin() + m_current_idx + 1);
}