summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviews4.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2018-08-09 16:30:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-10 08:20:52 +0200
commit4e63c00f4dd5f8ac6496481e687c59209f9aee07 (patch)
treed43341c2cdef53fbbe4dd9103faa529d08cedd98 /sd/source/ui/view/drviews4.cxx
parent7fdd5a12f6d20422ebda1d3afd5e5146cadbe0e5 (diff)
unnecessary null check before dynamic_cast, in sd
Change-Id: I91579ece17b85b1ae9926b7a05eb641672e8ecbd Reviewed-on: https://gerrit.libreoffice.org/58772 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/view/drviews4.cxx')
-rw-r--r--sd/source/ui/view/drviews4.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index f8aca149a4ae..32f9fcf96c0f 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -155,7 +155,7 @@ bool DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin)
{
SdrObject* pObj = aIter.Next();
- if(pObj && dynamic_cast< const SdrTextObj *>( pObj ) != nullptr)
+ if(auto pSdrTextObj = dynamic_cast<SdrTextObj *>( pObj ))
{
SdrInventor nInv(pObj->GetObjInventor());
sal_uInt16 nKnd(pObj->GetObjIdentifier());
@@ -164,7 +164,7 @@ bool DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin)
(OBJ_TITLETEXT == nKnd || OBJ_OUTLINETEXT == nKnd || OBJ_TEXT == nKnd)
&& bDidVisitOldObject)
{
- pCandidate = static_cast<SdrTextObj*>(pObj);
+ pCandidate = pSdrTextObj;
}
if(pObj == pOldObj)