Very minor code cleanup in AddFileToHistory()

Declare "i" inside the loop and make a variable that could be const
actually const.

No real changes.
This commit is contained in:
Vadim Zeitlin
2021-04-05 16:21:19 +02:00
parent f8f0b8b50c
commit d46ba0b435

View File

@@ -141,8 +141,7 @@ void wxFileHistoryBase::AddFileToHistory(const wxString& file)
void wxFileHistoryBase::DoRefreshLabels() void wxFileHistoryBase::DoRefreshLabels()
{ {
size_t i; const size_t numFiles = m_fileHistory.size();
size_t numFiles = m_fileHistory.size();
// If no files, then no need to refresh the menu // If no files, then no need to refresh the menu
if ( numFiles == 0 ) if ( numFiles == 0 )
@@ -152,7 +151,7 @@ void wxFileHistoryBase::DoRefreshLabels()
wxFileName firstFn(m_fileHistory[0]); wxFileName firstFn(m_fileHistory[0]);
// Update the labels in all menus // 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]); const wxFileName currFn(m_fileHistory[i]);