bugfix/ai-static-analysis #82

Open
localhorst wants to merge 15 commits from bugfix/ai-static-analysis into master
5 changed files with 93 additions and 66 deletions
Showing only changes of commit 43ccdbd4d8 - Show all commits

View File

@ -143,8 +143,6 @@ void reHDD::ThreadUserInput()
while (true) while (true)
{ {
Drive *tmpSelectedDrive = getSelectedDrive(); Drive *tmpSelectedDrive = getSelectedDrive();
if (tmpSelectedDrive != nullptr)
{
// cout << TUI::readUserInput() << endl; // cout << TUI::readUserInput() << endl;
switch (TUI::readUserInput()) switch (TUI::readUserInput())
@ -182,10 +180,13 @@ void reHDD::ThreadUserInput()
break; break;
case TUI::UserInput::Shred: case TUI::UserInput::Shred:
// cout << "Shred" << endl; // cout << "Shred" << endl;
if (tmpSelectedDrive != nullptr)
{
if (tmpSelectedDrive->state == Drive::NONE) if (tmpSelectedDrive->state == Drive::NONE)
{ {
tmpSelectedDrive->state = Drive::SHRED_SELECTED; tmpSelectedDrive->state = Drive::SHRED_SELECTED;
} }
}
ui->updateTUI(&listDrives, u8SelectedEntry); ui->updateTUI(&listDrives, u8SelectedEntry);
break; break;
case TUI::UserInput::ShredAll: case TUI::UserInput::ShredAll:
@ -214,7 +215,6 @@ void reHDD::ThreadUserInput()
break; break;
} }
} }
}
} }
void reHDD::ThreadShred(Drive *const pDrive) void reHDD::ThreadShred(Drive *const pDrive)