[Libreoffice-commits] core.git: sal/osl

Stephan Bergmann sbergman at redhat.com
Sun Mar 29 05:28:09 PDT 2015


 sal/osl/unx/osxlocale.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 59722bbb7c9eda0b8e23340eda2ce3029b627542
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sun Mar 29 14:27:21 2015 +0200

    loplugin:cstylecast
    
    Change-Id: Iec37e09d0da181f6af268fa0c8c43a2e1fef5dbe

diff --git a/sal/osl/unx/osxlocale.cxx b/sal/osl/unx/osxlocale.cxx
index 3fb9664..f8b0054 100644
--- a/sal/osl/unx/osxlocale.cxx
+++ b/sal/osl/unx/osxlocale.cxx
@@ -57,7 +57,7 @@ namespace
         if (pref == NULL) // return fallback value 'en_US'
              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);
     }
@@ -84,14 +84,14 @@ rtl::OUString macosx_getLocale()
     CFArrayGuard arrGuard(subs);
 
     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
     // value the second value is always the country!
     if (CFArrayGetCount(subs) > 1)
     {
         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
     // system interface is UTF-8 based and sal tries to determine


More information about the Libreoffice-commits mailing list