summaryrefslogtreecommitdiffstats
path: root/include/svl
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-02-04 11:44:27 +0100
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2017-02-04 11:37:42 +0000
commitd584e2dcc0454e66151d888fb45c23ccb1634aa6 (patch)
tree784c067bdb12093e0f0b889490f92b23dd344ef9 /include/svl
parentfix desktop scripts (diff)
downloadcore-d584e2dcc0454e66151d888fb45c23ccb1634aa6.tar.gz
core-d584e2dcc0454e66151d888fb45c23ccb1634aa6.zip
simplify SfxWhichIter
only one of 164 calls used the ctor with a restricting range. handle this special case. remove nFrom and nTo members. use operator[] on range pointer to highlight we access lower [0] and upper [1] range bound. remove dtor. Change-Id: I87b28502515e45bb190425eb88aa187ac0b5b2d2 Reviewed-on: https://gerrit.libreoffice.org/33911 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'include/svl')
-rw-r--r--include/svl/whiter.hxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/svl/whiter.hxx b/include/svl/whiter.hxx
index e23633e62508..a6473d8afb4b 100644
--- a/include/svl/whiter.hxx
+++ b/include/svl/whiter.hxx
@@ -26,14 +26,14 @@ class SfxItemSet;
class SVL_DLLPUBLIC SfxWhichIter
{
- const sal_uInt16 *pRanges, *pStart;
- sal_uInt16 nOfst, nFrom, nTo;
+ const sal_uInt16* const pStart;
+ const sal_uInt16* pRanges;
+ sal_uInt16 nOffset;
public:
- SfxWhichIter( const SfxItemSet& rSet, sal_uInt16 nFrom = 0, sal_uInt16 nTo = USHRT_MAX );
- ~SfxWhichIter();
+ SfxWhichIter( const SfxItemSet& rSet );
- sal_uInt16 GetCurWhich() const { return *pRanges + nOfst; }
+ sal_uInt16 GetCurWhich() const { return pRanges[0] + nOffset; }
sal_uInt16 NextWhich();
sal_uInt16 FirstWhich();
};