Fix minor compile warnings.

This commit is contained in:
Stephen Anthony 2021-12-14 18:47:11 -03:30
parent bd15d76643
commit 6349df1242
2 changed files with 4 additions and 5 deletions

View File

@ -37,7 +37,6 @@ NavigationWidget::NavigationWidget(GuiObject* boss, const GUI::Font& font,
if(!myUseMinimalUI)
{
const int
fontHeight = _font.getFontHeight(),
fontWidth = _font.getMaxCharWidth(),
BTN_GAP = fontWidth / 4;
const bool smallIcon = lineHeight < 26;
@ -181,7 +180,7 @@ void NavigationWidget::PathWidget::setPath(const string& path)
cutFirst = true;
// Update/add widgets for path parts display
int idx = 0;
size_t idx = 0;
for(auto it = paths.rbegin(); it != paths.rend(); ++it, ++idx)
{
const string& curPath = *it;
@ -229,7 +228,7 @@ void NavigationWidget::PathWidget::setPath(const string& path)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const string& NavigationWidget::PathWidget::getPath(int idx) const
{
assert(idx < myFolderList.size());
assert(size_t(idx) < myFolderList.size());
return myFolderList[idx]->getPath();
}

View File

@ -43,7 +43,7 @@ class NavigationWidget : public Widget
~FolderLinkWidget() = default;
void setPath(const string& path) { myPath = path; }
const string& getPath() const { return myPath; };
const string& getPath() const { return myPath; }
private:
void drawWidget(bool hilite) override;
@ -122,4 +122,4 @@ class NavigationWidget : public Widget
NavigationWidget& operator=(NavigationWidget&&) = delete;
}; // NavigationWidget
#endif
#endif