diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-13 12:04:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-19 11:05:39 +0200 |
commit | d9e6002b70eadd47fe70ff5ef53a55e5fa32d846 (patch) | |
tree | 6ef2c5649c746cd21ca6bf9fe095f37305660b6c /svx/inc/sdr/properties | |
parent | e9f0d8d02885eca619552b19eab30c1eade9e7ef (diff) |
use union instead of void*
vaguely more readable and typesafe
Change-Id: I15e98034fb288756415913eff73bcaba4f2c0b9d
Reviewed-on: https://gerrit.libreoffice.org/36659
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/inc/sdr/properties')
-rw-r--r-- | svx/inc/sdr/properties/itemsettools.hxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/svx/inc/sdr/properties/itemsettools.hxx b/svx/inc/sdr/properties/itemsettools.hxx index 0e1f760e0777..c9cb93261ad0 100644 --- a/svx/inc/sdr/properties/itemsettools.hxx +++ b/svx/inc/sdr/properties/itemsettools.hxx @@ -36,7 +36,10 @@ namespace sdr class ItemChangeBroadcaster { bool mbSingleRect; - void* mpData; + union { + RectangleVector* mpRectangleVector; + tools::Rectangle* mpRectangle; + }; public: explicit ItemChangeBroadcaster(const SdrObject& rObj); @@ -44,7 +47,7 @@ namespace sdr sal_uInt32 GetRectangleCount() const { - return mbSingleRect ? 1 : static_cast<RectangleVector*>(mpData)->size(); + return mbSingleRect ? 1 : mpRectangleVector->size(); } const tools::Rectangle& GetRectangle(sal_uInt32 nIndex) const; }; |