[Libreoffice-commits] core.git: vcl/source

Stephan Bergmann sbergman at redhat.com
Wed Oct 19 18:41:41 UTC 2016


 vcl/source/gdi/CommonSalLayout.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 17cbea4159c369cc9324a67ab2f1aac9cf416476
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Oct 19 20:41:14 2016 +0200

    loplugin:nullptr, loplugin:redundantcast
    
    Change-Id: Ie7b713a63cec9b714135a2ba840656870596eaef

diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index f6088b8..50d7007 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -83,7 +83,7 @@ static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU
                               );
 #elif defined(MACOSX) || defined(IOS)
         pBlob = hb_blob_create(reinterpret_cast<const char*>(pBuffer), nLength, HB_MEMORY_MODE_READONLY,
-                               const_cast<unsigned char*>(pBuffer), [](void* data){ delete[] reinterpret_cast<unsigned char*>(data); });
+                               pBuffer, [](void* data){ delete[] static_cast<unsigned char*>(data); });
 #else
         pBlob = hb_blob_create(reinterpret_cast<const char*>(pBuffer), nLength, HB_MEMORY_MODE_READONLY, nullptr, nullptr);
 #endif
@@ -217,7 +217,7 @@ CommonSalLayout::CommonSalLayout(const CoreTextStyle& rCoreTextStyle)
     {
         hb_face_t* pHbFace;
         CTFontRef pCTFont = static_cast<CTFontRef>(CFDictionaryGetValue(rCoreTextStyle.GetStyleDict(), kCTFontAttributeName));
-        CGFontRef pCGFont = CTFontCopyGraphicsFont(pCTFont, NULL);
+        CGFontRef pCGFont = CTFontCopyGraphicsFont(pCTFont, nullptr);
         if (pCGFont)
             pHbFace = hb_coretext_face_create(pCGFont);
         else


More information about the Libreoffice-commits mailing list