From baa47bde7f6f7a406e578a0202f792efc2ce9de4 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 30 Jun 2021 22:23:49 +0300 Subject: [PATCH] Removed unused MsgRange from SparseIdsSlice. --- Telegram/SourceFiles/data/data_sparse_ids.cpp | 7 ------- Telegram/SourceFiles/data/data_sparse_ids.h | 3 --- 2 files changed, 10 deletions(-) diff --git a/Telegram/SourceFiles/data/data_sparse_ids.cpp b/Telegram/SourceFiles/data/data_sparse_ids.cpp index 4f58b6aadf..b58b79d64a 100644 --- a/Telegram/SourceFiles/data/data_sparse_ids.cpp +++ b/Telegram/SourceFiles/data/data_sparse_ids.cpp @@ -12,12 +12,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL SparseIdsSlice::SparseIdsSlice( const base::flat_set &ids, - MsgRange range, std::optional fullCount, std::optional skippedBefore, std::optional skippedAfter) : _ids(ids) -, _range(range) , _fullCount(fullCount) , _skippedBefore(skippedBefore) , _skippedAfter(skippedAfter) { @@ -245,7 +243,6 @@ bool SparseIdsSliceBuilder::removeOne(MsgId messageId) { bool SparseIdsSliceBuilder::removeAll() { _ids = {}; - _range = { 0, ServerMaxMsgId }; _fullCount = 0; _skippedBefore = 0; _skippedAfter = 0; @@ -254,9 +251,6 @@ bool SparseIdsSliceBuilder::removeAll() { bool SparseIdsSliceBuilder::invalidateBottom() { _fullCount = _skippedAfter = std::nullopt; - if (_range.till == ServerMaxMsgId) { - _range.till = _ids.empty() ? _range.from : _ids.back(); - } checkInsufficient(); return true; } @@ -389,7 +383,6 @@ void SparseIdsSliceBuilder::requestMessagesCount() { SparseIdsSlice SparseIdsSliceBuilder::snapshot() const { return SparseIdsSlice( _ids, - _range, _fullCount, _skippedBefore, _skippedAfter); diff --git a/Telegram/SourceFiles/data/data_sparse_ids.h b/Telegram/SourceFiles/data/data_sparse_ids.h index 3f53824902..7864573fc8 100644 --- a/Telegram/SourceFiles/data/data_sparse_ids.h +++ b/Telegram/SourceFiles/data/data_sparse_ids.h @@ -21,7 +21,6 @@ public: SparseIdsSlice() = default; SparseIdsSlice( const base::flat_set &ids, - MsgRange range, std::optional fullCount, std::optional skippedBefore, std::optional skippedAfter); @@ -37,7 +36,6 @@ public: private: base::flat_set _ids; - MsgRange _range; std::optional _fullCount; std::optional _skippedBefore; std::optional _skippedAfter; @@ -205,7 +203,6 @@ private: Key _key; base::flat_set _ids; - MsgRange _range; std::optional _fullCount; std::optional _skippedBefore; std::optional _skippedAfter;