summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-01-12 15:58:00 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-01-13 11:27:30 +0100
commit73df1aea4f8a779241c053ab54f616f7b3a6dcb9 (patch)
tree4692637c56cdf2b9e1c2a949503ccd26a0fb3ca5 /sfx2
parentc3e9d393ea10da48e8b9ab4742dbc5277b7c4882 (diff)
array_view was changed to span in upcoming C++20
...see <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0122r7.pdf> "span: bounds-safe views for sequences of objects". o3tl::span is still an incomplete approximation of std::span; removed those o3tl::array_view members that are not present in std::span (and were not used in the code). Relies on C++17 __has_include to use standard <span> where available (e.g., in LLVM 7 libc++). Change-Id: I82a7e246b61b2456fa6183025d25eec4121ad3c9 Reviewed-on: https://gerrit.libreoffice.org/66215 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/dispatch.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 7a0d8a267d84..40c7652c1f42 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -20,6 +20,7 @@
#include <config_features.h>
#include <algorithm>
+#include <cstddef>
#include <deque>
#include <vector>
@@ -132,7 +133,7 @@ struct SfxDispatcher_Impl
SfxSlotFilterState nFilterEnabling; // 1==filter enabled slots,
// 2==ReadOnlyDoc overturned
- o3tl::array_view<sal_uInt16 const>
+ o3tl::span<sal_uInt16 const>
pFilterSIDs; // sorted Array of SIDs
SfxDisableFlags nDisableFlags;
bool bFlushed;
@@ -1541,11 +1542,11 @@ void SfxDispatcher::FlushImpl()
pDisp->SetSlotFilter();
*/
void SfxDispatcher::SetSlotFilter(SfxSlotFilterState nEnable,
- o3tl::array_view<sal_uInt16 const> pSIDs)
+ o3tl::span<sal_uInt16 const> pSIDs)
{
#ifdef DBG_UTIL
// Check Array
- for ( size_t n = 1; n < pSIDs.size(); ++n )
+ for ( std::ptrdiff_t n = 1; n < pSIDs.size(); ++n )
DBG_ASSERT( pSIDs[n] > pSIDs[n-1], "SetSlotFilter: SIDs not sorted" );
#endif