diff options
author | Robin Gareus <robin@gareus.org> | 2016-05-05 21:49:56 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-05-05 21:49:56 +0200 |
commit | 3dc7728038860bda6eb4b0de1f4a3e14ec9e86cc (patch) | |
tree | 2493b59c08ff53b46d19aeb6e897a1d497680bcc /libs/pbd | |
parent | 2624c0966b6adac66adc2eb1cf50a658f22d168c (diff) |
we always only use the "C" locale when saving.
Diffstat (limited to 'libs/pbd')
-rw-r--r-- | libs/pbd/controllable.cc | 4 | ||||
-rw-r--r-- | libs/pbd/locale_guard.cc | 12 | ||||
-rw-r--r-- | libs/pbd/pbd/locale_guard.h | 2 |
3 files changed, 2 insertions, 16 deletions
diff --git a/libs/pbd/controllable.cc b/libs/pbd/controllable.cc index 2e4b169c53..f95ddcce2e 100644 --- a/libs/pbd/controllable.cc +++ b/libs/pbd/controllable.cc @@ -107,7 +107,7 @@ XMLNode& Controllable::get_state () { XMLNode* node = new XMLNode (xml_node_name); - LocaleGuard lg (X_("C")); + LocaleGuard lg (); char buf[64]; /* Waves' "Pressure3" has a parameter called "ยต-iness" @@ -138,7 +138,7 @@ Controllable::get_state () int Controllable::set_state (const XMLNode& node, int /*version*/) { - LocaleGuard lg (X_("C")); + LocaleGuard lg (); const XMLProperty* prop; Stateful::save_extra_xml (node); diff --git a/libs/pbd/locale_guard.cc b/libs/pbd/locale_guard.cc index f848cf33f8..8007ea001b 100644 --- a/libs/pbd/locale_guard.cc +++ b/libs/pbd/locale_guard.cc @@ -34,21 +34,9 @@ using namespace PBD; * and some plugin may change either behind our back. */ -LocaleGuard::LocaleGuard (const char*) - : old_c (0) -{ - init (); -} - LocaleGuard::LocaleGuard () : old_c (0) { - init (); -} - -void -LocaleGuard::init () -{ char* actual = setlocale (LC_NUMERIC, NULL); if (strcmp ("C", actual)) { /* purpose of LocaleGuard is to make sure we're using "C" for diff --git a/libs/pbd/pbd/locale_guard.h b/libs/pbd/pbd/locale_guard.h index 3d37562ced..3342603f20 100644 --- a/libs/pbd/pbd/locale_guard.h +++ b/libs/pbd/pbd/locale_guard.h @@ -29,11 +29,9 @@ namespace PBD { struct LIBPBD_API LocaleGuard { public: LocaleGuard (); - LocaleGuard (const char*); // deprecated ~LocaleGuard (); private: - void init (); std::locale old_cpp; char* old_c; }; |