Rodolfo Ochoa has proposed merging lp:~zorba-coders/zorba/bug1102537 into 
lp:zorba.

Commit message:
Fix for windows compilation

Requested reviews:
  Juan Zacarias (juan457)
  Rodolfo Ochoa (rodolfo-ochoa)
Related bugs:
  Bug #1102537 in Zorba: "Windows not compiling"
  https://bugs.launchpad.net/zorba/+bug/1102537

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug1102537/+merge/144166

Fix for windows compilation
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1102537/+merge/144166
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/zorbautils/locale.cpp'
--- src/zorbautils/locale.cpp	2013-01-17 23:58:37 +0000
+++ src/zorbautils/locale.cpp	2013-01-21 18:27:23 +0000
@@ -191,7 +191,7 @@
  * call it directly since we might be running on Windows XP.  Hence, check to
  * see if it's available and call it indirectly if so.
  */
-static BOOL Zorba_IsValidLocaleName( LPCWSTR lpLocaleName ) {
+static bool Zorba_IsValidLocaleName( LPCWSTR lpLocaleName ) {
   typedef int (WINAPI *IsValidLocaleName_type)( LPCWSTR );
 
   static IsValidLocaleName_type IsValidLocaleName_ptr;
@@ -204,7 +204,7 @@
     init = true;
   }
 
-  return IsValidLocaleName_ptr ? IsValidLocaleName_ptr( lpLocaleName ) : 0;
+  return IsValidLocaleName_ptr ? IsValidLocaleName_ptr( lpLocaleName )!=0 : false;
 }
 
 #else /* WIN32 */
@@ -1303,7 +1303,7 @@
 bool is_supported( iso639_1::type lang, iso3166_1::type country ) {
 #ifdef WIN32
   unique_ptr<WCHAR[]> const wlocale_name( get_wlocale_name( lang, country ) );
-  return !!::Zorba_IsValidLocaleName( wlocale_name.get() );
+  return Zorba_IsValidLocaleName( wlocale_name.get() );
 #else
   if ( locale_t const loc = get_unix_locale_t( lang, country ) ) {
     ::freelocale( loc );

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to