diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-11-23 21:37:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-24 07:10:29 +0100 |
commit | 5ca88c4a1a97b95c829f6c7c570c4e5219e80e2e (patch) | |
tree | 2c66640aafc90448d32908a7c40960a21e596122 /svx/source/engine3d | |
parent | 356006712320c524515a959a022a0f2b02fa63bb (diff) |
static_cast after dynamic_cast
Change-Id: I196d4e9065961d6f4e3fef4475dd5f406e998447
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106451
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/engine3d')
-rw-r--r-- | svx/source/engine3d/view3d.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index 3c0fb45a0df0..e1cc81e5ad5d 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -1189,10 +1189,9 @@ bool E3dView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrObject *pObj = GetMarkedObjectByIndex(nObjs); if(pObj) { - if(nullptr != dynamic_cast< const E3dScene* >(pObj) && static_cast< E3dScene* >(pObj)->getRootE3dSceneFromE3dObject() == pObj) - { - bThereAreRootScenes = true; - } + if( auto pScene = dynamic_cast< const E3dScene* >(pObj) ) + if( pScene->getRootE3dSceneFromE3dObject() == pObj ) + bThereAreRootScenes = true; if(dynamic_cast< const E3dObject* >(pObj) != nullptr) { |