Use PBD::to_string API from pbd/string_convert.h in AudioTrackImporter
authorTim Mayberry <mojofunk@gmail.com>
Tue, 20 Sep 2016 12:48:59 +0000 (22:48 +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.

The code in this file has been disabled in the GUI for some time...and I doubt
it would now work correctly.

libs/ardour/audio_track_importer.cc

index dd77cb370e4cce491e9a17a425f0801d6df6bd07..e42c804f66b800b7cbe1c981894de767635232fd 100644 (file)
@@ -25,8 +25,8 @@
 #include "ardour/session.h"
 
 #include "pbd/controllable.h"
-#include "pbd/convert.h"
 #include "pbd/failed_constructor.h"
+#include "pbd/string_convert.h"
 
 #include <sstream>
 #include <algorithm>
@@ -99,7 +99,7 @@ AudioTrackImporter::AudioTrackImporter (XMLTree const & source,
        XMLNode * remote_control = xml_track.child ("RemoteControl");
        if (remote_control && (prop = remote_control->property ("id"))) {
                uint32_t control_id = session.ntracks() + session.nbusses() + 1;
-               prop->set_value (to_string (control_id, std::dec));
+               prop->set_value (to_string (control_id));
        }
 
        xml_track.remove_nodes_and_delete ("Extra");