From 051769bbc577aeede90558b6ab5c9be187940ca0 Mon Sep 17 00:00:00 2001 From: Igor Pavlov Date: Mon, 27 Aug 2007 00:00:00 +0000 Subject: 4.53 beta --- CPP/7zip/Archive/GZip/GZipUpdate.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'CPP/7zip/Archive/GZip/GZipUpdate.cpp') diff --git a/CPP/7zip/Archive/GZip/GZipUpdate.cpp b/CPP/7zip/Archive/GZip/GZipUpdate.cpp index 17e27c9f..1f5ebd0e 100755 --- a/CPP/7zip/Archive/GZip/GZipUpdate.cpp +++ b/CPP/7zip/Archive/GZip/GZipUpdate.cpp @@ -34,9 +34,7 @@ HRESULT UpdateArchive( int indexInClient, IArchiveUpdateCallback *updateCallback) { - UInt64 complexity = 0; - - complexity += unpackSize; + UInt64 complexity = unpackSize; RINOK(updateCallback->SetTotal(complexity)); @@ -54,13 +52,9 @@ HRESULT UpdateArchive( inStreamSpec->SetStream(fileInStream); inStreamSpec->Init(); - CLocalProgress *localProgressSpec = new CLocalProgress; - CMyComPtr localProgress = localProgressSpec; - localProgressSpec->Init(updateCallback, true); - - CLocalCompressProgressInfo *localCompressProgressSpec = - new CLocalCompressProgressInfo; - CMyComPtr compressProgress = localCompressProgressSpec; + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(updateCallback, true); COutArchive outArchive; outArchive.Create(outStream); @@ -72,8 +66,6 @@ HRESULT UpdateArchive( RINOK(outArchive.WriteHeader(item)); - localCompressProgressSpec->Init(localProgress, &complexity, NULL); - { RINOK(CreateCoder( EXTERNAL_CODECS_LOC_VARS @@ -102,7 +94,7 @@ HRESULT UpdateArchive( RINOK(deflateEncoder.QueryInterface(IID_ICompressSetCoderProperties, &setCoderProperties)); RINOK(setCoderProperties->SetCoderProperties(propIDs, properties, numProps)); } - RINOK(deflateEncoder->Code(crcStream, outStream, NULL, NULL, compressProgress)); + RINOK(deflateEncoder->Code(crcStream, outStream, NULL, NULL, progress)); item.FileCRC = inStreamSpec->GetCRC(); item.UnPackSize32 = (UInt32)inStreamSpec->GetSize(); -- cgit v1.2.3