diff options
author | John Emmas <johne53@tiscali.co.uk> | 2015-02-28 12:59:00 +0000 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2015-02-28 12:59:00 +0000 |
commit | 32e23db6652fbbe54957872a96953b3eed7dad66 (patch) | |
tree | 46b1d6c9b2ccd1e4b012ac57b9c9f11ac0c6ea73 /libs/pbd/locale_guard.cc | |
parent | 3c3586a4e1d362e0ce3b0c877e83911cd89383a9 (diff) |
In libpbd the sources 'localeguard.cc/.h' and 'locale_guard.cc/.h' are essentially identical now - so let's remove the former pair which were only ever needed when building with MSVC
(should hopefully avoid future confusion !!)
Diffstat (limited to 'libs/pbd/locale_guard.cc')
-rw-r--r-- | libs/pbd/locale_guard.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libs/pbd/locale_guard.cc b/libs/pbd/locale_guard.cc index b8493cf176..aa5a575521 100644 --- a/libs/pbd/locale_guard.cc +++ b/libs/pbd/locale_guard.cc @@ -29,13 +29,14 @@ using namespace PBD; std::string PBD::LocaleGuard::current; LocaleGuard::LocaleGuard (const char* str) - : old(0) + : old(0) { if (current != str) { old = strdup (setlocale (LC_NUMERIC, NULL)); if (strcmp (old, str)) { - if (setlocale (LC_NUMERIC, str)) - current = str; + if (setlocale (LC_NUMERIC, str)) { + current = str; + } } } } @@ -43,11 +44,11 @@ LocaleGuard::LocaleGuard (const char* str) LocaleGuard::~LocaleGuard () { if (old) { - if (setlocale (LC_NUMERIC, old)) + if (setlocale (LC_NUMERIC, old)) { current = old; + } - free ((char*)old); + free (old); } } - |