[Libreoffice-commits] online.git: common/Unit.hpp kit/Kit.cpp

Noel Grandin noel.grandin at collabora.co.uk
Tue Dec 27 10:46:00 UTC 2016


 common/Unit.hpp |    2 +-
 kit/Kit.cpp     |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 05f88bf9a5a5be5642fe48b08299d0643ff3f1d5
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Dec 23 09:02:19 2016 +0200

    loplugin:redundantcast
    
    Change-Id: I14945f34d3ab6d3c148b40e95069159bf40bd99e
    Reviewed-on: https://gerrit.libreoffice.org/32370
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/common/Unit.hpp b/common/Unit.hpp
index 835c500..84b99a8 100644
--- a/common/Unit.hpp
+++ b/common/Unit.hpp
@@ -100,7 +100,7 @@ public:
     static UnitBase& get()
     {
         assert(Global);
-        return *static_cast<UnitBase *>(Global);
+        return *Global;
     }
 
 private:
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index c6d7c62..02c442c 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -795,7 +795,7 @@ public:
         const std::string payload = pPayload ? pPayload : "(nil)";
         LOG_TRC("Document::GlobalCallback " << LOKitHelper::kitCallbackTypeToString(nType) <<
                 " [" << payload << "].");
-        Document* self = reinterpret_cast<Document*>(pData);
+        Document* self = static_cast<Document*>(pData);
         if (nType == LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY ||
             nType == LOK_CALLBACK_DOCUMENT_PASSWORD)
         {
@@ -815,7 +815,7 @@ public:
             return;
         }
 
-        CallbackDescriptor* pDescr = reinterpret_cast<CallbackDescriptor*>(pData);
+        CallbackDescriptor* pDescr = static_cast<CallbackDescriptor*>(pData);
         assert(pDescr && "Null callback data.");
         assert(pDescr->Doc && "Null Document instance.");
 


More information about the Libreoffice-commits mailing list