shuerhaaken avatar 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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.