Commits

shuerhaaken committed 4e61c2a

remove unneded join function

Comments (0)

Files changed (3)

bindings/c/taginfo_c.cc

     const Info *i = reinterpret_cast<const Info *>(info);
     StringList list = i->get_track_labels_list();
     
-    if(list.isEmpty())
-        cout << "list not there"  << endl;
+    if(list.isEmpty()) {
+        //cout << "list not there"  << endl;
+        return NULL;
+    }
     int len = list.size();
     char **labels = (char**)malloc(len * sizeof(char*));
     int j = 0;
     const Info *i = reinterpret_cast<const Info *>(info);
     StringList list = i->get_album_labels_list();
     
-    if(list.isEmpty())
-        cout << "list not there"  << endl;
+    if(list.isEmpty()) {
+        //cout << "list not there"  << endl;
+        return NULL;
+    }
     int len = list.size();
     char **labels = (char**)malloc(len * sizeof(char*));
     int j = 0;
     const Info *i = reinterpret_cast<const Info *>(info);
     StringList list = i->get_artist_labels_list();
     
-    if(list.isEmpty())
-        cout << "list not there"  << endl;
+    if(list.isEmpty()) {
+        //cout << "list not there"  << endl;
+        return NULL;
+    }
     int len = list.size();
     char **labels = (char**)malloc(len * sizeof(char*));
     int j = 0;

libtaginfo/info.cc

 }
 
 void Info::set_track_labels_list(const StringList &new_track_labels_list) {
-    track_labels = new_track_labels_list; // TODO does this work for StringList
-    track_labels_string = join(new_track_labels_list, "|");
+    track_labels = new_track_labels_list;
+    track_labels_string = new_track_labels_list.toString("|");
     changedflag |= CHANGED_TRACK_LABELS;
 }
 StringList Info::get_track_labels_list() const {
 
 void Info::set_artist_labels_list(const StringList &new_artist_labels_list) {
     artist_labels = new_artist_labels_list;
-    artist_labels_string = join(new_artist_labels_list, "|");
+    artist_labels_string = new_artist_labels_list.toString("|");
     changedflag |= CHANGED_ARTIST_LABELS;
 }
 StringList Info::get_artist_labels_list() const {
 
 void Info::set_album_labels_list(const StringList &new_album_labels_list) {
     album_labels = new_album_labels_list;
-    album_labels_string = join(new_album_labels_list, "|");
+    album_labels_string = new_album_labels_list.toString("|");
     changedflag |= CHANGED_ALBUM_LABELS;
 }
 StringList Info::get_album_labels_list() const {

libtaginfo/taginfo_internal.h

     return StringList::split(str, separator);
 }
 
-inline String join(const StringList strlist, const String &separator) {
-    return strlist.toString(separator);
-}
-
 
 inline string format(const char* fmt, ...) {
     char buffer[BUFFERSIZE] = {'\0'};