Fix minor compiler warnings (#1200)

* Fix compiler warning

Fix compiler warning about comparing signed with unsigned.

* Fix minor bug

category->size() is unsigned int, not long unsigned int

* Typo

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
Risto
2021-12-02 12:06:09 +11:00
committed by GitHub
co-authored by Peter Feerick
parent 3ab896ba2e
commit 66086e0c10
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ void ScreenMenu::updateTabs()
}
}
// set the active tab to the currently sown screen on the MainView
if ((g_model.view + 1) < getTabs())
// set the active tab to the currently shown screen on the MainView
if ((unsigned)(g_model.view + 1) < getTabs())
setCurrentTab(g_model.view + 1);
}
+1 -1
View File
@@ -431,7 +431,7 @@ class CategoryEditPage : public PageTab
// Details
char cnt[19];
snprintf(cnt, sizeof(cnt), "%lu %s", category->size(), STR_MODELS);
snprintf(cnt, sizeof(cnt), "%u %s", category->size(), STR_MODELS);
new StaticText(window, grid.getFieldSlot(3,1), cnt);
if(category->empty()) {