apply fixes

This commit is contained in:
Pengfei Zhu 2018-10-18 11:05:10 -05:00 committed by Valentin Vanelslande
parent 8082334fe3
commit 851e9476fd
2 changed files with 4 additions and 4 deletions

View File

@ -52,11 +52,11 @@ QtMiiSelectorDialog::QtMiiSelectorDialog(QWidget* parent, QtMiiSelector* mii_sel
auto file{std::move(file_result).Unwrap()};
u32 id;
u32 id = 0;
u32 offset{0x8};
MiiData mii;
for (int i{}; i < 100; ++i) {
for (int i = 0; i < 100; ++i) {
file->Read(offset, mii.size(), mii.data());
std::memcpy(&id, mii.data(), sizeof(u32));
if (id != 0) {
@ -73,7 +73,7 @@ QtMiiSelectorDialog::QtMiiSelectorDialog(QWidget* parent, QtMiiSelector* mii_sel
return;
}
if (combobox->count() >= static_cast<int>(config.initially_selected_mii_index)) {
if (combobox->count() > static_cast<int>(config.initially_selected_mii_index)) {
combobox->setCurrentIndex(static_cast<int>(config.initially_selected_mii_index));
}

View File

@ -17,7 +17,7 @@ class QtMiiSelectorDialog final : public QDialog {
Q_OBJECT
public:
QtMiiSelectorDialog(QWidget* parent, QtMiiSelector* mii_selector_);
QtMiiSelectorDialog(QWidget* parent, QtMiiSelector* mii_selector);
private:
void ShowNoMiis();