Use PBD::to_string API from pbd/string_convert.h in AudioFileTagger
authorTim Mayberry <mojofunk@gmail.com>
Tue, 20 Sep 2016 12:56:39 +0000 (22:56 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Tue, 18 Apr 2017 23:37:00 +0000 (09:37 +1000)
Use pbd/string_convert.h API instead of std::ostream for numeric formatting to
remain locale independent and not have to use a LocaleGuard. The formatting is
equivalent.

libs/ardour/audiofile_tagger.cc

index e2d81176e115dc87e0527efc7d9c538dab2e4039..0131292680b394e5747cddaf31239165924bbbc6 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "ardour/session_metadata.h"
 
-#include "pbd/convert.h"
+#include "pbd/string_convert.h"
 
 #include <taglib/fileref.h>
 #include <taglib/flacfile.h>
@@ -118,7 +118,7 @@ AudiofileTagger::tag_vorbis_comment (TagLib::Ogg::XiphComment & tag, SessionMeta
        tag.addField ("MIXER", TL_STR(metadata.mixer()));
        tag.addField ("COMPILATION", TL_STR(metadata.compilation()));
        tag.addField ("DISCSUBTITLE", TL_STR(metadata.disc_subtitle()));
-       tag.addField ("DISCNUMBER", to_string (metadata.disc_number(), std::dec));
+       tag.addField ("DISCNUMBER", to_string (metadata.disc_number()));
 
        // No field for total discs or tracks