diff --git a/libs/pbd/MSVCpbd/pbd.vcproj b/libs/pbd/MSVCpbd/pbd.vcproj index 4e3866d01b..72d525d0b7 100644 --- a/libs/pbd/MSVCpbd/pbd.vcproj +++ b/libs/pbd/MSVCpbd/pbd.vcproj @@ -355,7 +355,7 @@ > -#include -#include - -#include "pbd/localeguard.h" - -// JE - added temporarily, to reduce the delay effects when calling -// setlocale() recursively in a Windows GUI thread (we should think -// about moving the caller(s) into a dedicated worker thread). -std::string PBD::LocaleGuard::current; - -PBD::LocaleGuard::LocaleGuard (const char* str) - : old(0) -{ - if (current != str) { - old = strdup (setlocale (LC_NUMERIC, NULL)); - if (strcmp (old, str)) { - if (setlocale (LC_NUMERIC, str)) { - current = str; - } - } - } -} - -PBD::LocaleGuard::~LocaleGuard () -{ - if (old) { - if (setlocale (LC_NUMERIC, old)) { - current = old; - } - - free (old); - } -} - - diff --git a/libs/pbd/pbd/localeguard.h b/libs/pbd/pbd/localeguard.h deleted file mode 100644 index 21ea5380fa..0000000000 --- a/libs/pbd/pbd/localeguard.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 1999-2010 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __pbd_localeguard_h__ -#define __pbd_localeguard_h__ - -#include - -namespace PBD { - -struct LIBPBD_API /* Added by JE - */ LocaleGuard { - LocaleGuard (const char*); - ~LocaleGuard (); - const char* old; - - /* JE - temporary !!!! */static std::string current; -}; - -}; // namespace - -#endif /* __pbd_localeguard_h__ */