mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-10 08:51:12 +00:00
Fix compilation of history widget with GCC 6. (#3016)
error: inconsistent deduction for 'auto': 'int' and then 'auto' auto start = 0, end = list.size(); ^~~~ Signed-off-by: Wouter van Kesteren <woutershep@gmail.com> (github: woutershep)
This commit is contained in:
parent
54c409d967
commit
540ba9bfaf
@ -190,7 +190,8 @@ namespace {
|
|||||||
// is applied once for blocks list in a history and once for items list in the found block
|
// is applied once for blocks list in a history and once for items list in the found block
|
||||||
template <bool TopToBottom, typename T>
|
template <bool TopToBottom, typename T>
|
||||||
int binarySearchBlocksOrItems(const T &list, int edge) {
|
int binarySearchBlocksOrItems(const T &list, int edge) {
|
||||||
auto start = 0, end = list.size();
|
// static_cast to work around GCC bug #78693
|
||||||
|
auto start = 0, end = static_cast<int>(list.size());
|
||||||
while (end - start > 1) {
|
while (end - start > 1) {
|
||||||
auto middle = (start + end) / 2;
|
auto middle = (start + end) / 2;
|
||||||
auto top = list[middle]->y;
|
auto top = list[middle]->y;
|
||||||
|
Loading…
Reference in New Issue
Block a user