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

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Oct 14 06:34:29 UTC 2020


 bridges/source/cpp_uno/msvc_shared/cpp2uno.cxx |    4 ++--
 bridges/source/cpp_uno/msvc_shared/except.cxx  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 06ac088aeec09f7f90d3ccbffc2f5eed04b82151
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Oct 13 17:11:01 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Oct 14 08:33:39 2020 +0200

    loplugin:redundantcast (clang-cl)
    
    Change-Id: I2918d9ac8a4600bf5729604bda1beffb1dca78d5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104244
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/bridges/source/cpp_uno/msvc_shared/cpp2uno.cxx b/bridges/source/cpp_uno/msvc_shared/cpp2uno.cxx
index e114a1019df7..872cc079a984 100644
--- a/bridges/source/cpp_uno/msvc_shared/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/msvc_shared/cpp2uno.cxx
@@ -247,7 +247,7 @@ typelib_TypeClass __cdecl cpp_mediate(void** pCallStack, const sal_Int32 nFuncti
                           + " vtable index " + OUString::number(nFunctionIndex) + "/"
                           + OUString::number(pInterfaceTD->nMapFunctionIndexToMemberIndex);
         SAL_WARN("bridges", sError);
-        throw uno::RuntimeException(sError, reinterpret_cast<uno::XInterface*>(pThis));
+        throw uno::RuntimeException(sError, static_cast<uno::XInterface*>(pThis));
     }
 
     // determine called method
@@ -345,7 +345,7 @@ typelib_TypeClass __cdecl cpp_mediate(void** pCallStack, const sal_Int32 nFuncti
         }
         default:
             throw uno::RuntimeException("no member description found!",
-                                        reinterpret_cast<uno::XInterface*>(pThis));
+                                        static_cast<uno::XInterface*>(pThis));
     }
 
     return eRet;
diff --git a/bridges/source/cpp_uno/msvc_shared/except.cxx b/bridges/source/cpp_uno/msvc_shared/except.cxx
index f6914922a14f..5bce2b04bc47 100644
--- a/bridges/source/cpp_uno/msvc_shared/except.cxx
+++ b/bridges/source/cpp_uno/msvc_shared/except.cxx
@@ -133,7 +133,7 @@ ExceptionInfos::~ExceptionInfos() throw()
 
     osl::MutexGuard aGuard(m_aMutex);
     for (auto& rEntry : m_allRaiseInfos)
-        delete reinterpret_cast<RaiseInfo*>(rEntry.second);
+        delete static_cast<RaiseInfo*>(rEntry.second);
 }
 
 RaiseInfo* ExceptionInfos::getRaiseInfo(typelib_TypeDescription* pTD) throw()


More information about the Libreoffice-commits mailing list