]> git.saurik.com Git - wxWidgets.git/commitdiff
shorter code for wxMac
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 4 Dec 2007 17:50:33 +0000 (17:50 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 4 Dec 2007 17:50:33 +0000 (17:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/intl.cpp

index b718973feaf0675c2a6bf3ec52b21ee9ce7d6465..c03a9824b32a0192e1295c78016b632326ea6d1e 100644 (file)
@@ -1940,12 +1940,9 @@ void wxLocale::AddCatalogLookupPathPrefix(const wxString& prefix)
     // because the locale identifier (kCFLocaleIdentifier) is formatted a little bit differently, eg 
     // az_Cyrl_AZ@calendar=buddhist;currency=JPY we just recreate the base info as expected by wx here
     
-    CFTypeRef cfstr = CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode);
-    wxMacCFStringHolder str(CFStringCreateCopy(NULL, static_cast<CFStringRef>(cfstr)));
+    wxMacCFStringHolder str(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode)));
     langFull = str.AsString()+"_";
-        
-    cfstr = CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode);
-    str.Assign(CFStringCreateCopy(NULL, static_cast<CFStringRef>(cfstr)));
+    str.Assign(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode)));
     langFull += str.AsString();
 #else
     if (!wxGetEnv(wxT("LC_ALL"), &langFull) &&