mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-25 04:38:23 +00:00
Fix build in Xcode.
This commit is contained in:
parent
4c8187f623
commit
97356032ac
@ -536,7 +536,8 @@ void InnerWidget::paintEvent(QPaintEvent *e) {
|
|||||||
const auto reorderingPinned = (_aboveIndex >= 0)
|
const auto reorderingPinned = (_aboveIndex >= 0)
|
||||||
&& !_pinnedRows.empty();
|
&& !_pinnedRows.empty();
|
||||||
const auto reorderingIndex = promoted + _aboveIndex;
|
const auto reorderingIndex = promoted + _aboveIndex;
|
||||||
const auto reorderingRow = (reorderingIndex < list.size())
|
const auto reorderingRow = (reorderingIndex >= 0
|
||||||
|
&& reorderingIndex < list.size())
|
||||||
? (list.cbegin() + reorderingIndex)->get()
|
? (list.cbegin() + reorderingIndex)->get()
|
||||||
: nullptr;
|
: nullptr;
|
||||||
if (reorderingRow) {
|
if (reorderingRow) {
|
||||||
|
@ -198,6 +198,9 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct FilterResult {
|
struct FilterResult {
|
||||||
|
FilterResult(not_null<Row*> row) : row(row) {
|
||||||
|
}
|
||||||
|
|
||||||
not_null<Row*> row;
|
not_null<Row*> row;
|
||||||
int top = 0;
|
int top = 0;
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ Row *List::rowAtY(int y) const {
|
|||||||
return (top <= y && bottom > y) ? row.get() : nullptr;
|
return (top <= y && bottom > y) ? row.get() : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
List::const_iterator List::findByY(int y) const {
|
List::iterator List::findByY(int y) const {
|
||||||
return ranges::lower_bound(_rows, y, ranges::less(), [](const Row *row) {
|
return ranges::lower_bound(_rows, y, ranges::less(), [](const Row *row) {
|
||||||
return row->top() + row->height();
|
return row->top() + row->height();
|
||||||
});
|
});
|
||||||
|
@ -64,8 +64,7 @@ public:
|
|||||||
return cfind(value);
|
return cfind(value);
|
||||||
}
|
}
|
||||||
[[nodiscard]] iterator find(Row *value) { return cfind(value); }
|
[[nodiscard]] iterator find(Row *value) { return cfind(value); }
|
||||||
[[nodiscard]] const_iterator findByY(int y) const;
|
[[nodiscard]] iterator findByY(int y) const;
|
||||||
[[nodiscard]] iterator findByY(int y) { return findByY(y); }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void adjustByName(not_null<Row*> row);
|
void adjustByName(not_null<Row*> row);
|
||||||
|
Loading…
Reference in New Issue
Block a user