diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-22 08:11:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-22 08:13:42 +0100 |
commit | e6c124ae3b4de78848344a172003de934e1cb163 (patch) | |
tree | 99bbb9c600af26b18842ef33fca9790685d55ccc /sw/inc/section.hxx | |
parent | 08bdb40656898fc484f5200b63610a31369ddd87 (diff) |
Some more loplugin:cstylecast: sw
note the two TODOs about suspicious casts
Change-Id: I324fa05b30a5c8aa1d9e9a6d488a1e295226e788
Diffstat (limited to 'sw/inc/section.hxx')
-rw-r--r-- | sw/inc/section.hxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index 9774dee72c30..4a1edd435a41 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -174,8 +174,8 @@ public: SectionType GetType() const { return m_Data.GetType(); } void SetType(SectionType const eType) { return m_Data.SetType(eType); } - SwSectionFmt* GetFmt() { return (SwSectionFmt*)GetRegisteredIn(); } - SwSectionFmt const * GetFmt() const { return (SwSectionFmt const *)GetRegisteredIn(); } + inline SwSectionFmt* GetFmt(); + inline SwSectionFmt const * GetFmt() const; // Set hidden/protected -> update the whole tree! // (Attributes/flags are set/get.) @@ -346,6 +346,16 @@ public: }; +SwSectionFmt* SwSection::GetFmt() +{ + return static_cast<SwSectionFmt*>(GetRegisteredIn()); +} + +SwSectionFmt const * SwSection::GetFmt() const +{ + return static_cast<SwSectionFmt const *>(GetRegisteredIn()); +} + inline SwSection* SwSection::GetParent() const { SwSectionFmt const * pFmt = GetFmt(); |