Commits

shuerhaaken committed fe51664

remove unused code

Comments (0)

Files changed (5)

+commit add746adb60bf7b9c63d6b1afe3e8152a595b809
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Thu Mar 21 12:10:01 2013 +0100
+
+    avoid asprintf
+
 commit 593f07b216c5e388b58b8de7c83beb4ca4f20458
 Author: Jörn Magens <shuerhaaken@googlemail.com>
 Date:   Thu Mar 21 11:56:19 2013 +0100

libtaginfo/mpcinfo.cc

                 taglib_apetag->addValue("ALBUM ARTIST", album_artist);
             
             if(changedflag & CHANGED_DATA_RATING) {
-//                char* str;
                 taglib_apetag->addValue("RATING", format("%u", rating_to_popularity(rating))); // TODO
-//                if(asprintf (&str, "%u", rating_to_popularity(rating)) >= 0) { //TODO
-//                    taglib_apetag->addValue("RATING", str);
-//                    free (str);
-//                    str = NULL;
-//                }
                 taglib_apetag->addValue("PLAY_COUNTER", format("%u", playcount));
-//                if(asprintf (&str, "%u", playcount) >= 0) {
-//                    taglib_apetag->addValue("PLAY_COUNTER", str);
-//                    free (str);
-//                }
             }
             // Labels
             if(changedflag & CHANGED_TRACK_LABELS)

libtaginfo/ogginfo.cc

             if(changedflag & CHANGED_DATA_RATING) {
                 xiphcomment->addField("RATING", format("%u", rating_to_popularity(rating)));
                 xiphcomment->addField("PLAY_COUNTER", format("%u", playcount));
-//                char* str;
-//                if(asprintf (&str, "%u", rating_to_popularity(rating)) >= 0) {
-//                    xiphcomment->addField("RATING", str);
-//                    free(str);
-//                }
-//                
-//                if(asprintf (&str, "%u", playcount) >= 0) {
-//                    xiphcomment->addField("PLAY_COUNTER", str);
-//                    free(str);
-//                }
             }
             // The Labels
             if(changedflag & CHANGED_TRACK_LABELS)

libtaginfo/speexinfo.cc

             if(changedflag & CHANGED_DATA_RATING) {
                 xiphcomment->addField("RATING", format("%u", rating_to_popularity(rating)));
                 xiphcomment->addField("PLAY_COUNTER", format("%u", playcount));
-//                char* str;
-//                if(asprintf (&str, "%u", rating_to_popularity(rating)) >= 0) {
-//                    xiphcomment->addField("RATING", str);
-//                    free(str);
-//                }
-//                
-//                if(asprintf (&str, "%u", playcount) >= 0) {
-//                    xiphcomment->addField("PLAY_COUNTER", str);
-//                    free(str);
-//                }
             }
             // The Labels
             if(changedflag & CHANGED_TRACK_LABELS)

libtaginfo/wavpackinfo.cc

             if(changedflag & CHANGED_DATA_RATING) {
                 taglib_apetag->addValue("RATING", format("%u", rating_to_popularity(rating)));
                 taglib_apetag->addValue("PLAY_COUNTER", format("%u", playcount));
-//                char* str;
-//                
-//                if(asprintf (&str, "%u", rating_to_popularity(rating)) >= 0) {
-//                    taglib_apetag->addValue("RATING", str);
-//                    free(str);
-//                    str = NULL;
-//                }
-//                
-//                if(asprintf (&str, "%u", playcount) >= 0) {
-//                    taglib_apetag->addValue("PLAY_COUNTER", str);
-//                    free(str);
-//                }
             }
             // The Labels
             if(changedflag & CHANGED_ARTIST_LABELS)