qmgr: Simplify GetProgress() with a structure copy.
This commit is contained in:
parent
da5151fd54
commit
91e4394c1b
|
@ -122,9 +122,7 @@ static HRESULT WINAPI BackgroundCopyFile_GetProgress(
|
|||
TRACE("(%p)->(%p)\n", file, pVal);
|
||||
|
||||
EnterCriticalSection(&file->owner->cs);
|
||||
pVal->BytesTotal = file->fileProgress.BytesTotal;
|
||||
pVal->BytesTransferred = file->fileProgress.BytesTransferred;
|
||||
pVal->Completed = file->fileProgress.Completed;
|
||||
*pVal = file->fileProgress;
|
||||
LeaveCriticalSection(&file->owner->cs);
|
||||
|
||||
return S_OK;
|
||||
|
|
|
@ -506,10 +506,7 @@ static HRESULT WINAPI BackgroundCopyJob_GetProgress(
|
|||
return E_INVALIDARG;
|
||||
|
||||
EnterCriticalSection(&This->cs);
|
||||
pVal->BytesTotal = This->jobProgress.BytesTotal;
|
||||
pVal->BytesTransferred = This->jobProgress.BytesTransferred;
|
||||
pVal->FilesTotal = This->jobProgress.FilesTotal;
|
||||
pVal->FilesTransferred = This->jobProgress.FilesTransferred;
|
||||
*pVal = This->jobProgress;
|
||||
LeaveCriticalSection(&This->cs);
|
||||
|
||||
return S_OK;
|
||||
|
|
Loading…
Reference in New Issue