qmgr: Simplify GetProgress() with a structure copy.

oldstable
Nikolay Sivov 2015-06-23 19:59:40 +03:00 committed by Alexandre Julliard
parent da5151fd54
commit 91e4394c1b
2 changed files with 2 additions and 7 deletions

View File

@ -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;

View File

@ -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;