From dfa97f4d90ec3660dada364fc50295a056534e2f Mon Sep 17 00:00:00 2001 From: Thomas Knoefel Date: Sat, 20 Jan 2024 21:48:21 +0100 Subject: [PATCH] added values to Find and Replace Column --- src/MultiReplacePanel.cpp | 8 ++++---- src/MultiReplacePanel.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/MultiReplacePanel.cpp b/src/MultiReplacePanel.cpp index 4a86973..119756a 100644 --- a/src/MultiReplacePanel.cpp +++ b/src/MultiReplacePanel.cpp @@ -847,10 +847,10 @@ void MultiReplace::resetCountColumns() { InvalidateRect(_replaceListView, NULL, TRUE); } -void MultiReplace::updateCountColumns(int itemIndex, int findCount, int replaceCount) +void MultiReplace::updateCountColumns(size_t itemIndex, int findCount, int replaceCount) { // Check if the itemIndex is valid - if (itemIndex < 0 || itemIndex >= replaceListData.size()) { + if (itemIndex >= replaceListData.size()) { return; } @@ -1543,7 +1543,7 @@ void MultiReplace::handleReplaceAllButton() { return; } ::SendMessage(_hScintilla, SCI_BEGINUNDOACTION, 0, 0); - for (int i = 0; i < replaceListData.size(); ++i) + for (size_t i = 0; i < replaceListData.size(); ++i) { if (replaceListData[i].isSelected) { @@ -2694,7 +2694,7 @@ void MultiReplace::handleMarkMatchesButton() { return; } - for (int i = 0; i < replaceListData.size(); ++i) { + for (size_t i = 0; i < replaceListData.size(); ++i) { if (replaceListData[i].isSelected) { std::string findTextUtf8 = convertAndExtend(replaceListData[i].findText, replaceListData[i].extended); int searchFlags = (replaceListData[i].wholeWord * SCFIND_WHOLEWORD) diff --git a/src/MultiReplacePanel.h b/src/MultiReplacePanel.h index a346814..0bf8600 100644 --- a/src/MultiReplacePanel.h +++ b/src/MultiReplacePanel.h @@ -358,7 +358,7 @@ class MultiReplace : public StaticDialog void selectRows(const std::vector& rowsToSelect); void handleCopyToListButton(); void resetCountColumns(); - void updateCountColumns(int itemIndex, int findCount, int replaceCount = -1); + void updateCountColumns(size_t itemIndex, int findCount, int replaceCount = -1); //Replace void handleReplaceAllButton();