aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/zenserver/projectstore/projectstore.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp
index 0e1fb2e9a..f4ad869aa 100644
--- a/src/zenserver/projectstore/projectstore.cpp
+++ b/src/zenserver/projectstore/projectstore.cpp
@@ -2062,17 +2062,13 @@ ProjectStore::Oplog::IterateOplogLocked(std::function<void(CbObjectView)>&& Hand
return Lhs.Offset < Rhs.Offset;
});
- std::span<OplogEntryAddress> EntrySpan;
+ std::span<OplogEntryAddress> EntrySpan = Entries;
if (EntryPaging != nullptr)
{
int32_t Size = int32_t(Entries.size());
int32_t Start = std::clamp(EntryPaging->Start, 0, Size);
int32_t End = std::clamp(EntryPaging->Start + EntryPaging->Count, 0, Size);
- EntrySpan = decltype(EntrySpan)(Entries.begin() + Start, End - Start);
- }
- else
- {
- EntrySpan = Entries;
+ EntrySpan = EntrySpan.subspan(Start, End - Start);
}
m_Storage->ReplayLogEntries(EntrySpan, [&](CbObjectView Op) { Handler(Op); });