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

Caolán McNamara caolanm at redhat.com
Thu Apr 13 08:08:11 UTC 2017


 svx/source/sdr/properties/itemsettools.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0b42e895efd1d456b0deee4949644f9d20e622ab
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Apr 13 09:07:03 2017 +0100

    static cast following dynamic cast
    
    Change-Id: I34575121851f6b9629fdf2f3dae10be74dc27744

diff --git a/svx/source/sdr/properties/itemsettools.cxx b/svx/source/sdr/properties/itemsettools.cxx
index 7e5e2bf97484..942b5715ce68 100644
--- a/svx/source/sdr/properties/itemsettools.cxx
+++ b/svx/source/sdr/properties/itemsettools.cxx
@@ -36,9 +36,9 @@ namespace sdr
     {
         ItemChangeBroadcaster::ItemChangeBroadcaster(const SdrObject& rObj)
         {
-            if(dynamic_cast<const SdrObjGroup*>( &rObj ) !=  nullptr)
+            if (const SdrObjGroup* pGroupObj = dynamic_cast<const SdrObjGroup*>(&rObj))
             {
-                SdrObjListIter aIter(static_cast<const SdrObjGroup&>(rObj), SdrIterMode::DeepNoGroups);
+                SdrObjListIter aIter(*pGroupObj, SdrIterMode::DeepNoGroups);
                 mpData = new RectangleVector;
                 DBG_ASSERT(mpData, "ItemChangeBroadcaster: No memory (!)");
                 static_cast<RectangleVector*>(mpData)->reserve(aIter.Count());


More information about the Libreoffice-commits mailing list