2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-04 00:25:17 +00:00

Fix -Wunused-variable warnings

This commit is contained in:
Ilya Fedin
2021-07-13 21:51:07 +04:00
committed by John Preston
parent b6881022ce
commit 79cc797aff
156 changed files with 65 additions and 435 deletions

View File

@@ -697,10 +697,6 @@ void InnerWidget::paintCollapsedRow(
bool selected) const {
Expects(row->folder != nullptr);
const auto smallWidth = st::dialogsPadding.x()
+ st::dialogsPhotoSize
+ st::dialogsPhotoPadding;
const auto narrow = (width() <= smallWidth);
const auto text = row->folder->chatListName();
const auto unread = row->folder->chatListUnreadCount();
Layout::PaintCollapsedRow(
@@ -2584,7 +2580,7 @@ void InnerWidget::loadPeerPhotos() {
int32 from = (yFrom - filteredOffset()) / st::dialogsRowHeight;
if (from < 0) from = 0;
if (from < _filterResults.size()) {
int32 to = (yTo / int32(st::dialogsRowHeight)) + 1, w = width();
int32 to = (yTo / int32(st::dialogsRowHeight)) + 1;
if (to > _filterResults.size()) to = _filterResults.size();
for (; from < to; ++from) {
@@ -2595,7 +2591,7 @@ void InnerWidget::loadPeerPhotos() {
from = (yFrom > filteredOffset() + st::searchedBarHeight ? ((yFrom - filteredOffset() - st::searchedBarHeight) / int32(st::dialogsRowHeight)) : 0) - _filterResults.size();
if (from < 0) from = 0;
if (from < _peerSearchResults.size()) {
int32 to = (yTo > filteredOffset() + st::searchedBarHeight ? ((yTo - filteredOffset() - st::searchedBarHeight) / int32(st::dialogsRowHeight)) : 0) - _filterResults.size() + 1, w = width();
int32 to = (yTo > filteredOffset() + st::searchedBarHeight ? ((yTo - filteredOffset() - st::searchedBarHeight) / int32(st::dialogsRowHeight)) : 0) - _filterResults.size() + 1;
if (to > _peerSearchResults.size()) to = _peerSearchResults.size();
for (; from < to; ++from) {
@@ -2605,7 +2601,7 @@ void InnerWidget::loadPeerPhotos() {
from = (yFrom > filteredOffset() + ((_peerSearchResults.empty() ? 0 : st::searchedBarHeight) + st::searchedBarHeight) ? ((yFrom - filteredOffset() - (_peerSearchResults.empty() ? 0 : st::searchedBarHeight) - st::searchedBarHeight) / int32(st::dialogsRowHeight)) : 0) - _filterResults.size() - _peerSearchResults.size();
if (from < 0) from = 0;
if (from < _searchResults.size()) {
int32 to = (yTo > filteredOffset() + (_peerSearchResults.empty() ? 0 : st::searchedBarHeight) + st::searchedBarHeight ? ((yTo - filteredOffset() - (_peerSearchResults.empty() ? 0 : st::searchedBarHeight) - st::searchedBarHeight) / int32(st::dialogsRowHeight)) : 0) - _filterResults.size() - _peerSearchResults.size() + 1, w = width();
int32 to = (yTo > filteredOffset() + (_peerSearchResults.empty() ? 0 : st::searchedBarHeight) + st::searchedBarHeight ? ((yTo - filteredOffset() - (_peerSearchResults.empty() ? 0 : st::searchedBarHeight) - st::searchedBarHeight) / int32(st::dialogsRowHeight)) : 0) - _filterResults.size() - _peerSearchResults.size() + 1;
if (to > _searchResults.size()) to = _searchResults.size();
for (; from < to; ++from) {
@@ -2680,7 +2676,6 @@ bool InnerWidget::chooseHashtag() {
}
ChosenRow InnerWidget::computeChosenRow() const {
auto msgId = ShowAtUnreadMsgId;
if (_state == WidgetState::Default) {
if (_selected) {
return {
@@ -2747,7 +2742,6 @@ RowDescriptor InnerWidget::chatListEntryBefore(
}
const auto whichHistory = which.key.history();
const auto whichFullId = which.fullId;
if (!whichHistory) {
return RowDescriptor();
}
@@ -2825,7 +2819,6 @@ RowDescriptor InnerWidget::chatListEntryAfter(
}
const auto whichHistory = which.key.history();
const auto whichFullId = which.fullId;
if (!whichHistory) {
return RowDescriptor();
}