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 /svl/source/items/itemset.cxx | |
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 'svl/source/items/itemset.cxx')
-rw-r--r-- | svl/source/items/itemset.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 39ec0a18222c..62b1ea3cb8c3 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -146,18 +146,18 @@ SfxItemSet::SfxItemSet( std::size_t i = 0; std::size_t size = 0; #if !defined NDEBUG - sal_uInt16 prev = 0; + //TODO: sal_uInt16 prev = 0; #endif for (auto const & p: wids) { assert(svl::detail::validRange(p.wid1, p.wid2)); - assert(prev == 0 || svl::detail::validGap(prev, p.wid1)); + //TODO: assert(prev == 0 || svl::detail::validGap(prev, p.wid1)); m_pWhichRanges[i++] = p.wid1; m_pWhichRanges[i++] = p.wid2; size += svl::detail::rangeSize(p.wid1, p.wid2); // cannot overflow, assuming std::size_t is no smaller than // sal_uInt16 #if !defined NDEBUG - prev = p.wid2; + //TODO: prev = p.wid2; #endif } m_pWhichRanges[i] = 0; |