diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-05 14:21:02 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-05 14:21:02 -0400 |
commit | 25603d810ff9b19e41ebc4815d996afc385dc614 (patch) | |
tree | a80b0ead8b4707cf44134ea90134727bb9dfa16a /libs/pbd/locale_guard.cc | |
parent | f2c5522f0f0ddc70ebf182186b3cc821252dd24f (diff) |
spelling fixes and an explanatory comment
Diffstat (limited to 'libs/pbd/locale_guard.cc')
-rw-r--r-- | libs/pbd/locale_guard.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/pbd/locale_guard.cc b/libs/pbd/locale_guard.cc index c0d351febf..a448cbd24b 100644 --- a/libs/pbd/locale_guard.cc +++ b/libs/pbd/locale_guard.cc @@ -26,10 +26,10 @@ using namespace PBD; -/* The initial C++ locate is "C" regardless of the user's preferred locale. +/* The initial C++ locale is "C" regardless of the user's preferred locale. * and affects std::sprintf() et al from <cstdio> * - * the C locale from stlocale() matches the user's preferred locale + * the C locale from setlocale() matches the user's preferred locale * and effects ::sprintf() et al from <stdio.h> * * Setting the C++ locale will change the C locale, but not the other way 'round. @@ -53,6 +53,9 @@ LocaleGuard::init () { char* actual = setlocale (LC_NUMERIC, NULL); if (strcmp ("C", actual)) { + /* purpose of LocaleGuard is to make sure we're using "C" for + the numeric locale during its lifetime, so make it so. + */ old_c = strdup (actual); /* this changes both C++ and C locale */ std::locale::global (std::locale (std::locale::classic(), "C", std::locale::numeric)); |