From 850869bb0f545cf3c6648c6e27915c7847bcc0b0 Mon Sep 17 00:00:00 2001 From: zneix Date: Sat, 31 Jul 2021 22:34:47 +0200 Subject: [PATCH] Follow-up to 4ba4a2f33cd3952c0d909d7d874fe9d26622f44c --- src/widgets/Notebook.cpp | 4 ++-- src/widgets/splits/SplitInput.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/widgets/Notebook.cpp b/src/widgets/Notebook.cpp index 1d1bbe785..d6abad27d 100644 --- a/src/widgets/Notebook.cpp +++ b/src/widgets/Notebook.cpp @@ -552,8 +552,8 @@ void Notebook::performLayout(bool animated) { auto largestWidth = 0; int colStart = col * verticalRowSpace; - int colEnd = - std::min((col + 1) * verticalRowSpace, this->items_.size()); + int colEnd = std::min((col + 1) * verticalRowSpace, + static_cast(this->items_.size())); for (int i = colStart; i < colEnd; i++) { diff --git a/src/widgets/splits/SplitInput.cpp b/src/widgets/splits/SplitInput.cpp index 2a734bc49..570e52f43 100644 --- a/src/widgets/splits/SplitInput.cpp +++ b/src/widgets/splits/SplitInput.cpp @@ -486,7 +486,8 @@ void SplitInput::updateCompletionPopup() return; } - for (int i = clamp(position, 0, text.length() - 1); i >= 0; i--) + for (int i = clamp(position, 0, static_cast(text.length() - 1)); + i >= 0; i--) { if (text[i] == ' ') { @@ -560,7 +561,8 @@ void SplitInput::insertCompletionText(const QString &input_) auto text = edit.toPlainText(); auto position = edit.textCursor().position(); - for (int i = clamp(position, 0, text.length() - 1); i >= 0; i--) + for (int i = clamp(position, 0, static_cast(text.length() - 1)); + i >= 0; i--) { bool done = false; if (text[i] == ':')