monitor send gets access to the (shared) pannable of the track/bus, thus ensuring...
[ardour2.git] / libs / pbd / locale_guard.cc
blob30fdeadebae5ee8a9ee44f9f90a55dcec3d78b52
1 #include <stdlib.h>
2 #include <string.h>
3 #include <locale.h>
5 #include "pbd/locale_guard.h"
7 using namespace PBD;
9 LocaleGuard::LocaleGuard (const char* str)
11 old = setlocale (LC_NUMERIC, NULL);
13 if (old) {
14 old = strdup (old);
15 if (strcmp (old, str)) {
16 setlocale (LC_NUMERIC, str);
21 LocaleGuard::~LocaleGuard ()
23 setlocale (LC_NUMERIC, old);
25 if (old) {
26 free ((char*)old);