summaryrefslogtreecommitdiff
path: root/mg_playlist.c
diff options
context:
space:
mode:
authorlvw <lvw@e10066b5-e1e2-0310-b819-94efdf66514b>2004-10-04 20:47:58 +0000
committerlvw <lvw@e10066b5-e1e2-0310-b819-94efdf66514b>2004-10-04 20:47:58 +0000
commit44cd4c0319c75d4315fe0554d701effe77680776 (patch)
treeaf037733af84b3a217256e2269ee5df2bcff22d6 /mg_playlist.c
parent50075887187e1801f3d3425f20a6b6127ffd7ff8 (diff)
downloadvdr-plugin-muggle-44cd4c0319c75d4315fe0554d701effe77680776.tar.gz
vdr-plugin-muggle-44cd4c0319c75d4315fe0554d701effe77680776.tar.bz2
Added a patch to correct minor errors. Further, remove using namespace directives in order to remain compatible with g++ 2.95.4
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@200 e10066b5-e1e2-0310-b819-94efdf66514b
Diffstat (limited to 'mg_playlist.c')
-rw-r--r--mg_playlist.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/mg_playlist.c b/mg_playlist.c
index 3c7dae0..a63519e 100644
--- a/mg_playlist.c
+++ b/mg_playlist.c
@@ -13,13 +13,13 @@
* making it persistent in some database.
*/
+#include <stdio.h>
#include "mg_playlist.h"
#include "mg_tools.h"
#include <vector>
#include <iostream>
-using namespace std;
/* ==== constructors ==== */
@@ -33,7 +33,7 @@ mgPlaylist::mgPlaylist()
m_listname = buffer;
}
-mgPlaylist::mgPlaylist(string listname)
+mgPlaylist::mgPlaylist(std::string listname)
{
m_current_idx = -1;
m_listname = listname;
@@ -67,9 +67,9 @@ void mgPlaylist::append(mgContentItem* item)
}
/* append a list of tracks at the end of the playlist */
-void mgPlaylist::appendList( vector<mgContentItem*> *tracks )
+void mgPlaylist::appendList( std::vector<mgContentItem*> *tracks )
{
- vector<mgContentItem*>::iterator iter;
+ std::vector<mgContentItem*>::iterator iter;
mgDebug( 3, "Adding %d tracks to the playlist", tracks->size() );
@@ -116,7 +116,7 @@ void mgPlaylist::clear()
{
// TODO: who takes care of memory allocation/deallocation of mgItems?
- vector<mgContentItem*>::iterator iter;
+ std::vector<mgContentItem*>::iterator iter;
for( iter = m_list.begin(); iter != m_list.end(); iter++ )
{ // delete each item in the list
@@ -132,8 +132,8 @@ void mgPlaylist::clear()
void mgPlaylist::move( int from, int to )
{
- vector<mgContentItem*>::iterator from_iter = m_list.begin() + from;
- vector<mgContentItem*>::iterator to_iter = m_list.begin() + to;
+ std::vector<mgContentItem*>::iterator from_iter = m_list.begin() + from;
+ std::vector<mgContentItem*>::iterator to_iter = m_list.begin() + to;
m_list.insert( to_iter, *from_iter);
m_list.erase( from_iter );
@@ -149,12 +149,12 @@ void mgPlaylist::move( int from, int to )
}
/*==== access tracks ====*/
-string mgPlaylist::getListname()
+std::string mgPlaylist::getListname()
{
return m_listname;
}
-void mgPlaylist::setListname(string name)
+void mgPlaylist::setListname(std::string name)
{
m_listname = name;
}
@@ -239,9 +239,9 @@ mgContentItem* mgPlaylist::sneakNext()
}
}
-bool mgPlaylist::exportM3U( string m3u_file )
+bool mgPlaylist::exportM3U( std::string m3u_file )
{
- vector<mgContentItem*>::iterator iter;
+ std::vector<mgContentItem*>::iterator iter;
bool result = true;
// open a file for writing