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:
Wouter van Kesteren 2017-02-17 15:56:52 +01:00 committed by Christoph
parent 54c409d967
commit 540ba9bfaf

View File

@ -190,7 +190,8 @@ namespace {
// is applied once for blocks list in a history and once for items list in the found block
template <bool TopToBottom, typename T>
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) {
auto middle = (start + end) / 2;
auto top = list[middle]->y;