[Libreoffice-commits] core.git: canvas/source sal/osl sal/rtl sfx2/source shell/source svl/source winaccessibility/source xmlsecurity/source

Stephan Bergmann sbergman at redhat.com
Wed Nov 29 11:01:14 UTC 2017


 canvas/source/directx/dx_spritedevicehelper.cxx       |    2 +-
 sal/osl/w32/file.cxx                                  |    2 +-
 sal/rtl/alloc_arena.cxx                               |    2 +-
 sfx2/source/appl/shutdowniconw32.cxx                  |    2 +-
 shell/source/win32/shlxthandler/infotips/infotips.cxx |    2 +-
 svl/source/svdde/ddesvr.cxx                           |    2 +-
 winaccessibility/source/UAccCOM/AccActionBase.cxx     |    4 ++--
 xmlsecurity/source/xmlsec/mscrypt/akmngr.cxx          |    6 +++---
 8 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 368f806aaa75fb80790026677e2400580536ed7a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 29 10:10:26 2017 +0100

    loplugin:unnecessaryparen (clang-cl)
    
    Change-Id: I3a2b7ed3fdef3b77c0a052b10f88918aa616779e
    Reviewed-on: https://gerrit.libreoffice.org/45469
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/canvas/source/directx/dx_spritedevicehelper.cxx b/canvas/source/directx/dx_spritedevicehelper.cxx
index e729dd84a5b1..330ec076bd65 100644
--- a/canvas/source/directx/dx_spritedevicehelper.cxx
+++ b/canvas/source/directx/dx_spritedevicehelper.cxx
@@ -194,7 +194,7 @@ namespace dxcanvas
     void SpriteDeviceHelper::resizeBackBuffer( const ::basegfx::B2ISize& rNewSize )
     {
         // disposed?
-        if(!(mpBackBuffer))
+        if(!mpBackBuffer)
             return;
 
         mpBackBuffer->resize(rNewSize);
diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index 7c0b6674c23f..158e58c54d40 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -253,7 +253,7 @@ oslFileError FileHandle_Impl::setPos(sal_uInt64 uPos)
 
 sal_uInt64 FileHandle_Impl::getSize() const
 {
-    LONGLONG bufend = std::max((LONGLONG)(0), m_bufptr) + m_buflen;
+    LONGLONG bufend = std::max((LONGLONG)0, m_bufptr) + m_buflen;
     return std::max(m_size, sal::static_int_cast< sal_uInt64 >(bufend));
 }
 
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index 373de6d51ad9..8f9c64e0919e 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -1064,7 +1064,7 @@ void SAL_CALL rtl_machdep_free(
 #if defined(SAL_UNX)
     (void) munmap(pAddr, nSize);
 #elif defined(SAL_W32)
-    (void) VirtualFree (pAddr, (SIZE_T)(0), MEM_RELEASE);
+    (void) VirtualFree (pAddr, (SIZE_T)0, MEM_RELEASE);
 #endif /* (SAL_UNX || SAL_W32) */
 }
 
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx
index 2b6514445d7f..04e34a99f75c 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -235,7 +235,7 @@ static void deleteSystrayMenu( HMENU hMenu )
         MYITEM *pMyItem = reinterpret_cast<MYITEM*>(mi.dwItemData);
         if( pMyItem )
         {
-            (pMyItem->text).clear();
+            pMyItem->text.clear();
             delete pMyItem;
         }
         mi.fMask = MIIM_DATA;
diff --git a/shell/source/win32/shlxthandler/infotips/infotips.cxx b/shell/source/win32/shlxthandler/infotips/infotips.cxx
index 87fce0d29398..682fb3478eef 100644
--- a/shell/source/win32/shlxthandler/infotips/infotips.cxx
+++ b/shell/source/win32/shlxthandler/infotips/infotips.cxx
@@ -106,7 +106,7 @@ std::wstring getFileTypeInfo(const std::wstring& file_extension)
     wchar_t extKeyValue[MAX_STRING];
     wchar_t typeKeyValue[MAX_STRING];
     ::std::wstring sDot(L".");
-    if (QueryRegistryKey(HKEY_CLASSES_ROOT, (sDot.append(file_extension)).c_str(), L"", extKeyValue, MAX_STRING))
+    if (QueryRegistryKey(HKEY_CLASSES_ROOT, sDot.append(file_extension).c_str(), L"", extKeyValue, MAX_STRING))
         if (QueryRegistryKey( HKEY_CLASSES_ROOT, extKeyValue, L"",typeKeyValue, MAX_STRING))
             return typeKeyValue;
 
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index 8eedadf6ddf6..ce26573988b4 100644
--- a/svl/source/svdde/ddesvr.cxx
+++ b/svl/source/svdde/ddesvr.cxx
@@ -204,7 +204,7 @@ found:
     if ( pItem )
         pTopic->aItem = pItem->GetName();
     else
-        (pTopic->aItem).clear();
+        pTopic->aItem.clear();
 
     bool bRes = false;
     switch( nCode )
diff --git a/winaccessibility/source/UAccCOM/AccActionBase.cxx b/winaccessibility/source/UAccCOM/AccActionBase.cxx
index c1227a33c55a..a074c4895b37 100644
--- a/winaccessibility/source/UAccCOM/AccActionBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccActionBase.cxx
@@ -165,7 +165,7 @@ STDMETHODIMP CAccActionBase::get_keyBinding(
     if( !binding.is() )
         return E_FAIL;
 
-    long nCount = (binding.get())->getAccessibleKeyBindingCount();
+    long nCount = binding.get()->getAccessibleKeyBindingCount();
 
     *keyBinding = static_cast<BSTR*>(::CoTaskMemAlloc(nCount*sizeof(BSTR)));
 
@@ -175,7 +175,7 @@ STDMETHODIMP CAccActionBase::get_keyBinding(
 
     for( int index = 0;index < nCount;index++ )
     {
-        auto const wString = GetkeyBindingStrByXkeyBinding( (binding.get())->getAccessibleKeyBinding(index) );
+        auto const wString = GetkeyBindingStrByXkeyBinding( binding.get()->getAccessibleKeyBinding(index) );
 
         (*keyBinding)[index] = SysAllocString(o3tl::toW(wString.getStr()));
     }
diff --git a/xmlsecurity/source/xmlsec/mscrypt/akmngr.cxx b/xmlsecurity/source/xmlsec/mscrypt/akmngr.cxx
index 4f0edd4df43a..56560660eb99 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/akmngr.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/akmngr.cxx
@@ -151,7 +151,7 @@ xmlSecMSCryptoAppliedKeysMngrAdoptKeyStore(
         return (-1) ;
     }
 
-    return (0) ;
+    return 0 ;
 }
 
 int
@@ -186,7 +186,7 @@ xmlSecMSCryptoAppliedKeysMngrAdoptTrustedStore(
         return (-1) ;
     }
 
-    return (0) ;
+    return 0 ;
 }
 
 int
@@ -221,7 +221,7 @@ xmlSecMSCryptoAppliedKeysMngrAdoptUntrustedStore(
         return (-1) ;
     }
 
-    return (0) ;
+    return 0 ;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */


More information about the Libreoffice-commits mailing list