strat: use m_ for member variables
This commit is contained in:
@@ -29,10 +29,10 @@ namespace ams::mitm::sysupdater {
|
||||
}
|
||||
|
||||
AsyncPrepareSdCardUpdateImpl::~AsyncPrepareSdCardUpdateImpl() {
|
||||
if (this->thread_info) {
|
||||
os::WaitThread(this->thread_info->thread);
|
||||
os::DestroyThread(this->thread_info->thread);
|
||||
GetAsyncThreadAllocator()->Free(*this->thread_info);
|
||||
if (m_thread_info) {
|
||||
os::WaitThread(m_thread_info->thread);
|
||||
os::DestroyThread(m_thread_info->thread);
|
||||
GetAsyncThreadAllocator()->Free(*m_thread_info);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,16 +46,16 @@ namespace ams::mitm::sysupdater {
|
||||
|
||||
/* Ensure that we clean up appropriately. */
|
||||
ON_SCOPE_EXIT {
|
||||
if (!this->thread_info) {
|
||||
if (!m_thread_info) {
|
||||
GetAsyncThreadAllocator()->Free(info);
|
||||
}
|
||||
};
|
||||
|
||||
/* Create a thread for the task. */
|
||||
R_TRY(os::CreateThread(info.thread, [](void *arg) {
|
||||
auto *_this = reinterpret_cast<AsyncPrepareSdCardUpdateImpl *>(arg);
|
||||
_this->result = _this->Execute();
|
||||
_this->event.Signal();
|
||||
auto *async = reinterpret_cast<AsyncPrepareSdCardUpdateImpl *>(arg);
|
||||
async->m_result = async->Execute();
|
||||
async->m_event.Signal();
|
||||
}, this, info.stack, info.stack_size, info.priority));
|
||||
|
||||
/* Set the thread name. */
|
||||
@@ -65,16 +65,16 @@ namespace ams::mitm::sysupdater {
|
||||
os::StartThread(info.thread);
|
||||
|
||||
/* Set our thread info. */
|
||||
this->thread_info = info;
|
||||
m_thread_info = info;
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
Result AsyncPrepareSdCardUpdateImpl::Execute() {
|
||||
return this->task->PrepareAndExecute();
|
||||
return m_task->PrepareAndExecute();
|
||||
}
|
||||
|
||||
void AsyncPrepareSdCardUpdateImpl::CancelImpl() {
|
||||
this->task->Cancel();
|
||||
m_task->Cancel();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user