Use PBD::to_string from pbd/string_convert.h in ARDOUR::VCAManager
The numeric formatting is equivalent to iostreams when global C++ locale is set to "C" without the need for a LocaleGuard. I'm not sure this would have been an issue as the number of VCA's may never get high enough for digit grouping of the locale to affect numeric output, but now it is not a possibility.
This commit is contained in:
@@ -17,9 +17,9 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "pbd/convert.h"
|
||||
#include "pbd/error.h"
|
||||
#include "pbd/replace_all.h"
|
||||
#include "pbd/string_convert.h"
|
||||
|
||||
#include "ardour/boost_debug.h"
|
||||
#include "ardour/session.h"
|
||||
@@ -78,7 +78,7 @@ VCAManager::create_vca (uint32_t howmany, std::string const & name_template)
|
||||
string name = name_template;
|
||||
|
||||
if (name.find ("%n")) {
|
||||
string sn = PBD::to_string (num, std::dec);
|
||||
string sn = PBD::to_string (num);
|
||||
replace_all (name, "%n", sn);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user