[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56455] trunk/blender/intern/locale/ boost_locale_wrapper.cpp: Some minor cleanup/polish...

Bastien Montagne montagne29 at wanadoo.fr
Wed May 1 19:49:19 CEST 2013


Revision: 56455
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56455
Author:   mont29
Date:     2013-05-01 17:49:19 +0000 (Wed, 01 May 2013)
Log Message:
-----------
Some minor cleanup/polish...

Modified Paths:
--------------
    trunk/blender/intern/locale/boost_locale_wrapper.cpp

Modified: trunk/blender/intern/locale/boost_locale_wrapper.cpp
===================================================================
--- trunk/blender/intern/locale/boost_locale_wrapper.cpp	2013-05-01 17:43:33 UTC (rev 56454)
+++ trunk/blender/intern/locale/boost_locale_wrapper.cpp	2013-05-01 17:49:19 UTC (rev 56455)
@@ -62,22 +62,20 @@
 	try {
 		if (locale && locale[0]) {
 			_locale = gen(locale);
-			std::locale::global(_locale);
 		}
 		else {
 #ifdef __APPLE__
 			extern const char *user_locale; // pulled from Ghost_SystemCocoa
 			std::string locale_osx = user_locale + std::string(".UTF-8");
 			_locale = gen(locale_osx.c_str());
-			std::locale::global(_locale);
 #else
 			_locale = gen("");
-			std::locale::global(_locale);
 #endif
 		}
+		std::locale::global(_locale);
 		// Note: boost always uses "C" LC_NUMERIC by default!
 
-		/* Generate the locale string (useful to know which locale we are actually using in case of "default" one). */
+		// Generate the locale string (useful to know which locale we are actually using in case of "default" one).
 #define LOCALE_INFO std::use_facet<boost::locale::info>(_locale)
 
 		locale_str = LOCALE_INFO.language();




More information about the Bf-blender-cvs mailing list