Fixed two MSVC compiler warnings.

This commit is contained in:
Leon Styhre 2021-01-09 13:44:18 +01:00
parent fc69a2942f
commit b361da6e1e
2 changed files with 2 additions and 2 deletions

View file

@ -122,7 +122,7 @@ GuiGamelistOptions::GuiGamelistOptions(
root = mSystem->getRootFolder();
std::string sortType = root->getSortTypeString();
unsigned int numSortTypes = FileSorts::SortTypes.size();
unsigned int numSortTypes = static_cast<unsigned int>(FileSorts::SortTypes.size());
// If it's not a collection, then hide the System sort options.
if (!root->getSystem()->isCollection())
numSortTypes -= 2;

View file

@ -255,7 +255,7 @@ void GuiMenu::openUISettings()
auto default_sort_order = std::make_shared<SortList>
(mWindow, getHelpStyle(), "DEFAULT SORT ORDER", false);
// Exclude the System sort options.
unsigned int numSortTypes = FileSorts::SortTypes.size() - 2;
unsigned int numSortTypes = static_cast<unsigned int>(FileSorts::SortTypes.size() - 2);
for (unsigned int i = 0; i < numSortTypes; i++) {
if (FileSorts::SortTypes[i].description ==
Settings::getInstance()->getString("DefaultSortOrder")) {