From: Manuel Nickschas Date: Sun, 9 Sep 2018 22:04:49 +0000 (+0200) Subject: modernize: Use 'while(true)' instead of 'while(1)' X-Git-Tag: test-travis-01~134 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=d89f4d9cdbc167112e64fca1931e81bc27d17319 modernize: Use 'while(true)' instead of 'while(1)' --- diff --git a/src/client/messagemodel.cpp b/src/client/messagemodel.cpp index 8eae52bb..d817babc 100644 --- a/src/client/messagemodel.cpp +++ b/src/client/messagemodel.cpp @@ -349,7 +349,7 @@ int MessageModel::indexForId(MsgId id) // binary search int start = 0; int end = messageCount() - 1; - while (1) { + while (true) { if (end - start == 1) return end; int pivot = (end + start) / 2; diff --git a/src/qtui/chatviewsearchcontroller.cpp b/src/qtui/chatviewsearchcontroller.cpp index 23609136..e5026cd7 100644 --- a/src/qtui/chatviewsearchcontroller.cpp +++ b/src/qtui/chatviewsearchcontroller.cpp @@ -145,7 +145,7 @@ void ChatViewSearchController::updateHighlights(bool reuse) int start = 0; int end = _highlightItems.count() - 1; QPointF startPos; QPointF endPos; - while (1) { + while (true) { startPos = _highlightItems[start]->scenePos(); endPos = _highlightItems[end]->scenePos(); if (startPos == oldHighlightPos) {