Kaydet (Commit) 59722bbb authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:cstylecast

Change-Id: Iec37e09d0da181f6af268fa0c8c43a2e1fef5dbe
üst 4aad7e63
...@@ -57,7 +57,7 @@ namespace ...@@ -57,7 +57,7 @@ namespace
if (pref == NULL) // return fallback value 'en_US' if (pref == NULL) // return fallback value 'en_US'
return CFStringCreateWithCString(kCFAllocatorDefault, "en_US", kCFStringEncodingASCII); return CFStringCreateWithCString(kCFAllocatorDefault, "en_US", kCFStringEncodingASCII);
CFStringRef sref = (CFGetTypeID(pref) == CFArrayGetTypeID()) ? (CFStringRef)CFArrayGetValueAtIndex((CFArrayRef)pref, 0) : (CFStringRef)pref; CFStringRef sref = (CFGetTypeID(pref) == CFArrayGetTypeID()) ? static_cast<CFStringRef>(CFArrayGetValueAtIndex(static_cast<CFArrayRef>(pref), 0)) : static_cast<CFStringRef>(pref);
return CFLocaleCreateCanonicalLocaleIdentifierFromString(kCFAllocatorDefault, sref); return CFLocaleCreateCanonicalLocaleIdentifierFromString(kCFAllocatorDefault, sref);
} }
...@@ -84,14 +84,14 @@ rtl::OUString macosx_getLocale() ...@@ -84,14 +84,14 @@ rtl::OUString macosx_getLocale()
CFArrayGuard arrGuard(subs); CFArrayGuard arrGuard(subs);
rtl::OUStringBuffer buf; rtl::OUStringBuffer buf;
append(buf, (CFStringRef)CFArrayGetValueAtIndex(subs, 0)); append(buf, static_cast<CFStringRef>(CFArrayGetValueAtIndex(subs, 0)));
// country also available? Assumption: if the array contains more than one // country also available? Assumption: if the array contains more than one
// value the second value is always the country! // value the second value is always the country!
if (CFArrayGetCount(subs) > 1) if (CFArrayGetCount(subs) > 1)
{ {
buf.append("_"); buf.append("_");
append(buf, (CFStringRef)CFArrayGetValueAtIndex(subs, 1)); append(buf, static_cast<CFStringRef>(CFArrayGetValueAtIndex(subs, 1)));
} }
// Append 'UTF-8' to the locale because the Mac OS X file // Append 'UTF-8' to the locale because the Mac OS X file
// system interface is UTF-8 based and sal tries to determine // system interface is UTF-8 based and sal tries to determine
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment