From d46ba0b43562f003ede62e807a6a7bae29d38127 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 5 Apr 2021 16:21:19 +0200 Subject: [PATCH] Very minor code cleanup in AddFileToHistory() Declare "i" inside the loop and make a variable that could be const actually const. No real changes. --- src/common/filehistorycmn.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/filehistorycmn.cpp b/src/common/filehistorycmn.cpp index a0cf56efd1..732a95a372 100644 --- a/src/common/filehistorycmn.cpp +++ b/src/common/filehistorycmn.cpp @@ -141,8 +141,7 @@ void wxFileHistoryBase::AddFileToHistory(const wxString& file) void wxFileHistoryBase::DoRefreshLabels() { - size_t i; - size_t numFiles = m_fileHistory.size(); + const size_t numFiles = m_fileHistory.size(); // If no files, then no need to refresh the menu if ( numFiles == 0 ) @@ -152,7 +151,7 @@ void wxFileHistoryBase::DoRefreshLabels() wxFileName firstFn(m_fileHistory[0]); // Update the labels in all menus - for ( i = 0; i < numFiles; i++ ) + for ( size_t i = 0; i < numFiles; i++ ) { const wxFileName currFn(m_fileHistory[i]);