From 540ba9bfafbfee33c4b2ca58caed11d702369401 Mon Sep 17 00:00:00 2001 From: Wouter van Kesteren Date: Fri, 17 Feb 2017 15:56:52 +0100 Subject: [PATCH] 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 (github: woutershep) --- Telegram/SourceFiles/historywidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index c28d64b79a..9ff4e10d9d 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -190,7 +190,8 @@ namespace { // is applied once for blocks list in a history and once for items list in the found block template 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(list.size()); while (end - start > 1) { auto middle = (start + end) / 2; auto top = list[middle]->y;