13
0

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:
Tim Mayberry 2016-09-21 12:41:42 +10:00
parent 2386dc7ede
commit aede5c85d5

View File

@ -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);
}