remove unnecessary mutesx
This commit is contained in:
parent
70f5727eb3
commit
4862a45ef6
|
@ -156,7 +156,7 @@ void reHDD::ThreadUserInput()
|
|||
break;
|
||||
case TUI::UserInput::Delete:
|
||||
//cout << "Delete" << endl;
|
||||
mxDrives.lock();
|
||||
|
||||
if (getSelectedDrive() != nullptr)
|
||||
{
|
||||
if(getSelectedDrive()->state == Drive::NONE)
|
||||
|
@ -164,12 +164,12 @@ void reHDD::ThreadUserInput()
|
|||
getSelectedDrive()->state = Drive::DELETE_SELECTED;
|
||||
}
|
||||
}
|
||||
mxDrives.unlock();
|
||||
|
||||
ui->updateTUI(&listDrives, u8SelectedEntry);
|
||||
break;
|
||||
case TUI::UserInput::Shred:
|
||||
//cout << "Shred" << endl;
|
||||
mxDrives.lock();
|
||||
|
||||
if (getSelectedDrive() != nullptr)
|
||||
{
|
||||
if(getSelectedDrive()->state == Drive::NONE)
|
||||
|
@ -177,7 +177,7 @@ void reHDD::ThreadUserInput()
|
|||
getSelectedDrive()->state = Drive::SHRED_SELECTED;
|
||||
}
|
||||
}
|
||||
mxDrives.unlock();
|
||||
|
||||
ui->updateTUI(&listDrives, u8SelectedEntry);
|
||||
break;
|
||||
case TUI::UserInput::ShredAll:
|
||||
|
@ -492,7 +492,7 @@ void reHDD::handleArrowKey(TUI::UserInput userInput)
|
|||
|
||||
void reHDD::handleEnter()
|
||||
{
|
||||
mxDrives.lock();
|
||||
|
||||
if (getSelectedDrive() != nullptr)
|
||||
{
|
||||
if(getSelectedDrive()->state == Drive::TaskState::SHRED_SELECTED)
|
||||
|
@ -512,7 +512,6 @@ void reHDD::handleEnter()
|
|||
thread(ThreadDelete).detach();
|
||||
}
|
||||
}
|
||||
mxDrives.unlock();
|
||||
}
|
||||
|
||||
void reHDD::handleESC()
|
||||
|
|
Loading…
Reference in New Issue