The numeric formatting is equivalent. The string is being used in a label so it
could be argued that we want localized numeric formatting in this case, but as
it is only relevant if we have >=1000 meter strip keep it the same for now.
The C++ global locale is currently set to LC_NUMERIC=C by the first instance of
LocaleGuard so this change means numeric formatting is equivalent.
As the string is being used to construct a label, perhaps we do want to
generate localized numeric formatting in this case. Anyway keep it the same for
now.
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.
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.
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.
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
This avoids requiring a LocaleGuard to get the correct numeric formatting and
saves/restores the automation data to the precision required for roundtrip
equality.
Possible issue with numeric formatting using std::streams in locales with
grouping. Although I don't think it would be an issue in this case use locale
independant alternative for numeric formatting anyway.
string_compose uses std::ostream/stringstream which will insert thousands
separators in some locales. This was not a problem when LocaleGuard set the
global C++ locale to "C"
std::ostream/stringstream will use the current locale to determine the numeric
formatting. If the locale uses grouping then thousands separators will be
inserted in the output which produces an invalid color string in
UIConfiguration::reset_gtk_theme() and when converting colors to strings in
UIConfiguration::store_color_theme()
This has not been a problem so far because it appears that LocaleGuard does not
reset the LC_NUMERIC value for the global C++ locale. So if a LocaleGuard is
created at any time before these functions are called(even if it goes out of
scope) the numeric formatting used by std::streams will use the "C" locale
formatting facets.
These are now unused and functionality is replaced by XMLNode::set_property
set_property is a better name as a node can only have properties with unique
names and the property will be set or reset(if it already exists). Changing the
name also makes it easier to transition and test the new API.