diff options
author | Noel Grandin <noel@peralex.com> | 2014-11-10 10:39:17 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-11-10 15:22:15 +0200 |
commit | 08cdf1661159623414ae99a791295a0995a677e7 (patch) | |
tree | d491537fc5be546146c01ee84fe0588f65cf5a89 /sw | |
parent | 5cb6144f2119aa1dcce161724abfc22ead1d20b5 (diff) |
loplugin: cstylecast
Change-Id: I639ac26f4d84ff0a2d573d2e58bc5bd41052a925
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/cntfrm.hxx | 12 | ||||
-rw-r--r-- | sw/source/core/inc/frmtool.hxx | 5 |
2 files changed, 9 insertions, 8 deletions
diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx index 579b8fe63cf5..74b9f4d7fcb1 100644 --- a/sw/source/core/inc/cntfrm.hxx +++ b/sw/source/core/inc/cntfrm.hxx @@ -110,7 +110,7 @@ public: inline SwCntntFrm* SwCntntFrm::GetNextCntntFrm() const { if ( GetNext() && GetNext()->IsCntntFrm() ) - return (SwCntntFrm*)GetNext(); + return const_cast<SwCntntFrm*>(static_cast<const SwCntntFrm*>(GetNext())); else return (SwCntntFrm*)ImplGetNextCntntFrm( true ); } @@ -118,7 +118,7 @@ inline SwCntntFrm* SwCntntFrm::GetNextCntntFrm() const inline SwCntntFrm* SwCntntFrm::GetPrevCntntFrm() const { if ( GetPrev() && GetPrev()->IsCntntFrm() ) - return (SwCntntFrm*)GetPrev(); + return const_cast<SwCntntFrm*>(static_cast<const SwCntntFrm*>(GetPrev())); else return (SwCntntFrm*)ImplGetNextCntntFrm( false ); } @@ -134,20 +134,20 @@ inline const SwCntntNode *SwCntntFrm::GetNode() const inline const SwCntntFrm *SwCntntFrm::GetFollow() const { - return (const SwCntntFrm*)SwFlowFrm::GetFollow(); + return static_cast<const SwCntntFrm*>(SwFlowFrm::GetFollow()); } inline SwCntntFrm *SwCntntFrm::GetFollow() { - return (SwCntntFrm*)SwFlowFrm::GetFollow(); + return static_cast<SwCntntFrm*>(SwFlowFrm::GetFollow()); } inline const SwCntntFrm *SwCntntFrm::GetPrecede() const { - return (const SwCntntFrm*)SwFlowFrm::GetPrecede(); + return static_cast<const SwCntntFrm*>(SwFlowFrm::GetPrecede()); } inline SwCntntFrm *SwCntntFrm::GetPrecede() { - return (SwCntntFrm*)SwFlowFrm::GetPrecede(); + return static_cast<SwCntntFrm*>(SwFlowFrm::GetPrecede()); } #endif diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index 8003042244f5..04b70539b57d 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -26,6 +26,7 @@ #include "swcache.hxx" #include <editeng/lrspitem.hxx> #include <swfont.hxx> +#include <flyfrm.hxx> class SwPageFrm; class SwFlyFrm; @@ -200,7 +201,7 @@ class SwLayNotify : public SwFrmNotify { bool bLowersComplete; - SwLayoutFrm *GetLay() { return (SwLayoutFrm*)pFrm; } + SwLayoutFrm *GetLay() { return static_cast<SwLayoutFrm*>(pFrm); } public: SwLayNotify( SwLayoutFrm *pLayFrm ); @@ -214,7 +215,7 @@ class SwFlyNotify : public SwLayNotify { SwPageFrm *pOldPage; const SwRect aFrmAndSpace; - SwFlyFrm *GetFly() { return (SwFlyFrm*)pFrm; } + SwFlyFrm *GetFly() { return static_cast<SwFlyFrm*>(pFrm); } public: SwFlyNotify( SwFlyFrm *pFlyFrm ); |