From: Stefan Csomor Date: Tue, 4 Dec 2007 17:50:33 +0000 (+0000) Subject: shorter code for wxMac X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b2beaece19cf7b812d7ca9c253bf7f5190494517 shorter code for wxMac git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/intl.cpp b/src/common/intl.cpp index b718973fea..c03a9824b3 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -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(cfstr))); + wxMacCFStringHolder str(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode))); langFull = str.AsString()+"_"; - - cfstr = CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode); - str.Assign(CFStringCreateCopy(NULL, static_cast(cfstr))); + str.Assign(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode))); langFull += str.AsString(); #else if (!wxGetEnv(wxT("LC_ALL"), &langFull) &&