Commits

shuerhaaken committed 1b07e81

use proper empty strings in return values to avoid issues

  • Participants
  • Parent commits fe1e350

Comments (0)

Files changed (19)

+commit fe1e350e0877344dbbfeea3a9becba17adcd2dfc
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Fri Apr 5 11:12:41 2013 +0200
+
+    update changelog
+
 commit 8348078f0d289d26b3d3f5c5f6469bbd4deea5f4
 Author: Jörn Magens <shuerhaaken@googlemail.com>
 Date:   Fri Apr 5 11:07:47 2013 +0200

File configure.ac

 AC_PREREQ([2.59])
 m4_define(libtaginfo_major_version, 0)
 m4_define(libtaginfo_minor_version, 1)
-m4_define(libtaginfo_micro_version, 5)
+m4_define(libtaginfo_micro_version, 6)
 m4_define(libtaginfo_version, libtaginfo_major_version.libtaginfo_minor_version.libtaginfo_micro_version)
 m4_define([libtaginfo_name], [libtaginfo])
 

File libtaginfo/aiffinfo.cc

     if(taglib_tagId3v2)
         return get_id3v2_lyrics(taglib_tagId3v2);
     
-    return "";
+    return String();
 }
 
 

File libtaginfo/ape_common.cc

             return apetag->itemListMap()[TAG_LYRICS_UNSYNCED].toStringList().front();
         }
     }
-    return "";
+    return String();
 }
 
 

File libtaginfo/apeinfo.cc

     if(taglib_apetag->itemListMap().contains(APE_TAG_LYRICS)) {
         return taglib_apetag->itemListMap()[APE_TAG_LYRICS].toStringList().front();
     }
-    return "";
+    return String();
 }
 
 

File libtaginfo/asfinfo.cc

             return asf_tag->attributeListMap()[ "WM/Lyrics" ].front().toString();
         }
     }
-    return "";
+    return String();
 }
 
 

File libtaginfo/id3_common.cc

             return LyricsFrame->text();
         }
     }
-    return String("");
+    return String();
 }
 
 void get_typed_id3v2_image(char*& idata, int &idata_length,

File libtaginfo/info.cc

     taglib_fileref = NULL;
     taglib_file    = NULL;
     taglib_tag     = NULL;
-    
+
     set_file_name(filename);
 
     tracknumber = 0;
 }
 
 String Info::get_title() const {
-    return title;
+    if(String::null != title)
+        return title;
+    else
+        return String();
 }
 
 void Info::set_genre(String new_genre) {
     changedflag |= CHANGED_GENRE_TAG;
 }
 String Info::get_genre() const {
-    return genre;
+    if(String::null != genre)
+        return genre;
+    else
+        return String();
 }
 
 
     changedflag |= CHANGED_ARTIST_TAG;
 }
 String Info::get_artist() const {
-    return artist;
+    if(String::null != artist)
+        return artist;
+    else
+        return String();
 }
 
 void Info::set_is_compilation(bool compilation) {
     changedflag |= CHANGED_DATA_ALBUMARTIST;
 }
 String Info::get_album_artist() const {
-    return album_artist;
+    if(String::null != album_artist)
+        return album_artist;
+    else
+        return String();
 }
 
 void Info::set_album(String new_album) {
     changedflag |= CHANGED_ALBUM_TAG;
 }
 String Info::get_album() const {
-    return album;
+    if(String::null != album)
+        return album;
+    else
+        return String();
 }
 
 void Info::set_composer(String new_composer) {
     changedflag |= CHANGED_COMPOSER_TAG;
 }
 String Info::get_composer() const {
-    return composer;
+    if(String::null != composer)
+        return composer;
+    else
+        return String();
 }
 
 void Info::set_comments(String new_comments) {
     changedflag |= CHANGED_COMMENT_TAG;
 }
 String Info::get_comments(void) const {
-    return comments;
+    if(String::null != comments)
+        return comments;
+    else
+        return String();
 }
 
 void Info::set_tracknumber(int new_tracknumber) {
 
 
 String Info::get_lyrics() const {
-    return "";
+    return String();
 }
 
 

File libtaginfo/mp3info.cc

     if(taglib_tagId3v2)
         return get_id3v2_lyrics(taglib_tagId3v2);
     
-    return "";
+    return String();
 }
 
 

File libtaginfo/mp4_common.cc

             if(mp4tag->itemListMap().contains("\xa9lyr"))
             return mp4tag->itemListMap()[ "\xa9lyr" ].toStringList().front();
     }
-    return "";
+    return String();
 }
 
 

File libtaginfo/mpcinfo.cc

     if(taglib_apetag && taglib_apetag->itemListMap().contains(TAG_LYRICS)) {
         return taglib_apetag->itemListMap()[TAG_LYRICS].toStringList().front();
     }
-    return "";
+    return String();
 }
 
 

File libtaginfo/trueaudioinfo.cc

     if(taglib_tagId3v2) {
         return get_id3v2_lyrics(taglib_tagId3v2);
     }
-    return "";
+    return String();
 }
 
 

File libtaginfo/waveinfo.cc

     if(taglib_tagId3v2)
         return get_id3v2_lyrics(taglib_tagId3v2);
     
-    return "";
+    return String();
 }
 
 

File libtaginfo/xiph_common.cc

     if(xiphcomment && xiphcomment->contains("LYRICS")) {
         return xiphcomment->fieldListMap()[ "LYRICS" ].front();
     }
-    return "";
+    return String();
 }
 
 bool set_xiph_comment_lyrics(Ogg::XiphComment * xiphcomment, const String &lyrics) {

File tests/ctest/.deps/.dirstamp

Empty file removed.

File tests/ctest/.deps/main.Po

-# dummy

File tests/ctest/.dirstamp

Empty file removed.

File tests/ctest_read/main.c

     if(taginfo_info_read(info)) {
         char* name = taginfo_info_get_title(info);
         free(name);
+        char* comment = taginfo_info_get_comment(info);
+        free(comment);
     }
     else {
         taginfo_info_free(info);

File tests/samples/Makefile.am

     sample_v1_only.mp3 \
     sample_v2_only.mp3 \
     sample_v2_3_ext_header.mp3 \
+    sample_no-tags.flac \
     sample.aac \
     sample.m4a \
     sample.mpc \