diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:31:11 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:33:37 +0100 |
commit | 67c19855ab24004c29bb0741577432f0ed50d9bf (patch) | |
tree | a8c28cf2d101680f231645bc2219482bb17a0ff9 /starmath/inc | |
parent | af3cb5e85a54c5b9653f4757863b8ed15df8477b (diff) |
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Iee4396c5ac715e1b211c5fa6e1cb66b1e95e3f60
Diffstat (limited to 'starmath/inc')
-rw-r--r-- | starmath/inc/dialog.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/format.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/node.hxx | 4 | ||||
-rw-r--r-- | starmath/inc/symbol.hxx | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index bddec2d746e8..9c3987bb91fe 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -445,7 +445,7 @@ class SmSymDefineDialog : public ModalDialog SmSym * GetSymbol(const ComboBox &rComboBox); const SmSym * GetSymbol(const ComboBox &rComboBox) const { - return ((SmSymDefineDialog *) this)->GetSymbol(rComboBox); + return const_cast<SmSymDefineDialog *>(this)->GetSymbol(rComboBox); } void InitColor_Impl(); diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx index fb1287acbdb2..15bdd5527134 100644 --- a/starmath/inc/format.hxx +++ b/starmath/inc/format.hxx @@ -149,7 +149,7 @@ public: void RequestApplyChanges() const { - ((SmFormat *) this)->Broadcast(SfxSimpleHint(HINT_FORMATCHANGED)); + const_cast<SmFormat *>(this)->Broadcast(SfxSimpleHint(HINT_FORMATCHANGED)); } }; diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 9a3516c57837..a6aae542d0aa 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -1029,7 +1029,7 @@ public: /** Get body (Not NULL) */ const SmNode * GetBody() const { - return ((SmSubSupNode *) this)->GetBody(); + return const_cast<SmSubSupNode *>(this)->GetBody(); } void SetUseLimits(bool bVal) { bUseLimits = bVal; } @@ -1183,7 +1183,7 @@ public: SmNode * GetSymbol(); const SmNode * GetSymbol() const { - return ((SmOperNode *) this)->GetSymbol(); + return const_cast<SmOperNode *>(this)->GetSymbol(); } long CalcSymbolHeight(const SmNode &rSymbol, const SmFormat &rFormat) const; diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx index 2b6df4ff97da..51515406cec8 100644 --- a/starmath/inc/symbol.hxx +++ b/starmath/inc/symbol.hxx @@ -144,7 +144,7 @@ public: SmSym * GetSymbolByName(const OUString& rSymbolName); const SmSym * GetSymbolByName(const OUString& rSymbolName) const { - return ((SmSymbolManager *) this)->GetSymbolByName(rSymbolName); + return const_cast<SmSymbolManager *>(this)->GetSymbolByName(rSymbolName); } bool IsModified() const { return m_bModified; } |