diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-06-19 09:32:45 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-06-19 09:38:05 +0200 |
commit | 1e3a00f0c772a76a1dd76b8272e2c35a1802d574 (patch) | |
tree | a1eadac1680f1e46c789964200aa8a61bb659189 /include/svl/itemset.hxx | |
parent | 9fe114e78f1285397dcd2a0d2e3d6afc3024fa66 (diff) |
Make SfxItemSet ranges correct by construction: Fix static cases
...with the aid of an extended compilerplugins/clang/store/sfxitemsetrewrite.cxx
(which in turn needed a small addition to compilerplugins/clang/check.hxx).
Enable svl::detail::validGap check for the static case, but keep it disabled for
now for the dynamic case.
Change-Id: I4846ba8e99aff94a86518e2cb5044e575093386e
Diffstat (limited to 'include/svl/itemset.hxx')
-rw-r--r-- | include/svl/itemset.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx index a1715cc896f5..971444099f31 100644 --- a/include/svl/itemset.hxx +++ b/include/svl/itemset.hxx @@ -42,8 +42,8 @@ namespace detail { constexpr bool validRange(sal_uInt16 wid1, sal_uInt16 wid2) { return wid1 != 0 && wid1 <= wid2; } -constexpr bool validGap(sal_uInt16, sal_uInt16) -{ return true; } //TODO: wid2 > wid1 && wid2 - wid1 > 1 +constexpr bool validGap(sal_uInt16 wid1, sal_uInt16 wid2) +{ return wid2 > wid1 && wid2 - wid1 > 1; } template<sal_uInt16 WID1, sal_uInt16 WID2> constexpr bool validRanges() { return validRange(WID1, WID2); } |