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

Stephan Bergmann sbergman at redhat.com
Tue Mar 14 13:50:10 UTC 2017


 vcl/win/app/salshl.cxx    |    8 ++------
 vcl/win/gdi/winlayout.cxx |    4 ++--
 2 files changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 2789a8c202151fc8ce3cc3c220513200d67e8b07
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Mar 14 14:49:22 2017 +0100

    loplugin:subtlezeroinit (clang-cl)
    
    Change-Id: I34367cad2d07b9fc6c8f4607ee5e74625f12e78f

diff --git a/vcl/win/app/salshl.cxx b/vcl/win/app/salshl.cxx
index 3c3c710..3f8e5f5 100644
--- a/vcl/win/app/salshl.cxx
+++ b/vcl/win/app/salshl.cxx
@@ -102,12 +102,8 @@ bool ImplLoadSalIcon( int nId, HICON& rIcon, HICON& rSmallIcon )
     if( rIcon )
     {
         // add to icon cache
-        pSalIcon = new SalIcon();
-        pSalIcon->nId = nId;
-        pSalIcon->hIcon = rIcon;
-        pSalIcon->hSmallIcon = rSmallIcon;
-        pSalIcon->pNext = pSalData->mpFirstIcon;
-        pSalData->mpFirstIcon = pSalIcon;
+        pSalData->mpFirstIcon = new SalIcon{
+            nId, rIcon, rSmallIcon, pSalData->mpFirstIcon};
     }
 
     return (rSmallIcon != nullptr);
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index a8d71fc..b41ad59 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -249,13 +249,13 @@ TextOutRenderer & TextOutRenderer::get(bool bUseDWrite)
     {
         static std::unique_ptr<TextOutRenderer> _impl(D2DWriteTextOutRenderer::InitModules()
             ? static_cast<TextOutRenderer*>(new D2DWriteTextOutRenderer())
-            : static_cast<TextOutRenderer*>(new ExTextOutRenderer()));
+            : static_cast<TextOutRenderer*>(new ExTextOutRenderer));
 
         return *_impl;
     }
     else
     {
-        static std::unique_ptr<TextOutRenderer> _impl(new ExTextOutRenderer());
+        static std::unique_ptr<TextOutRenderer> _impl(new ExTextOutRenderer);
 
         return *_impl;
     }


More information about the Libreoffice-commits mailing list