diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-03-24 10:38:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-24 14:33:04 +0100 |
commit | 4f3fb443cea4364b2ec8cb56515ec9bdfe6f5391 (patch) | |
tree | 6e6a8055cdc809f74ef49c92fd8cb59132f86a74 /svx | |
parent | 2c5677647e535fb948757d89bc4960ceeb6b668d (diff) |
use mutable rather than const_cast..this
Change-Id: I0512ac563a8065814bccbcd942a47f1c5fa11c04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113018
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdogrp.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdovirt.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index 67783b147c3e..9124e0849090 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -199,7 +199,7 @@ const tools::Rectangle& SdrObjGroup::GetCurrentBoundRect() const // <aOutRect> has to contain the bounding rectangle if(0 != GetObjCount()) { - const_cast< SdrObjGroup* >(this)->aOutRect = GetAllObjBoundRect(); + aOutRect = GetAllObjBoundRect(); } return aOutRect; diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx index 552eb438b755..34b1361d7521 100644 --- a/svx/source/svdraw/svdovirt.cxx +++ b/svx/source/svdraw/svdovirt.cxx @@ -114,15 +114,15 @@ SdrObjList* SdrVirtObj::GetSubList() const const tools::Rectangle& SdrVirtObj::GetCurrentBoundRect() const { - const_cast<SdrVirtObj*>(this)->aOutRect=rRefObj.GetCurrentBoundRect(); // TODO: Optimize this. - const_cast<SdrVirtObj*>(this)->aOutRect+=aAnchor; + aOutRect = rRefObj.GetCurrentBoundRect(); // TODO: Optimize this. + aOutRect += aAnchor; return aOutRect; } const tools::Rectangle& SdrVirtObj::GetLastBoundRect() const { - const_cast<SdrVirtObj*>(this)->aOutRect=rRefObj.GetLastBoundRect(); // TODO: Optimize this. - const_cast<SdrVirtObj*>(this)->aOutRect+=aAnchor; + aOutRect = rRefObj.GetLastBoundRect(); // TODO: Optimize this. + aOutRect += aAnchor; return aOutRect; } |