Fix minor warnings from g++11.

This commit is contained in:
Stephen Anthony 2021-05-10 15:04:01 -02:30
parent 587bdee678
commit b8ed09695f
1 changed files with 2 additions and 2 deletions

View File

@ -559,7 +559,7 @@ int PromptWidget::historyDir(int& index, int direction, bool promptSpace)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void PromptWidget::historyAdd(const string& entry) void PromptWidget::historyAdd(const string& entry)
{ {
if(_historyIndex >= _history.size()) if(_historyIndex >= int(_history.size()))
_history.push_back(entry); _history.push_back(entry);
else else
_history[_historyIndex] = entry; _history[_historyIndex] = entry;
@ -766,7 +766,7 @@ bool PromptWidget::autoComplete(int direction)
_tabCount = int(list.size()) - 1; _tabCount = int(list.size()) - 1;
} }
else else
_tabCount = (++_tabCount) % list.size(); _tabCount = (_tabCount + 1) % list.size();
nextLine(); nextLine();
_currentPos = _promptStartPos; _currentPos = _promptStartPos;