Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Compress/LZMA_Alone/LzmaBench.cpp')
-rwxr-xr-xCPP/7zip/Compress/LZMA_Alone/LzmaBench.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/CPP/7zip/Compress/LZMA_Alone/LzmaBench.cpp b/CPP/7zip/Compress/LZMA_Alone/LzmaBench.cpp
index 2ad9a577..6a325fe0 100755
--- a/CPP/7zip/Compress/LZMA_Alone/LzmaBench.cpp
+++ b/CPP/7zip/Compress/LZMA_Alone/LzmaBench.cpp
@@ -28,11 +28,8 @@
#endif
#endif
-extern "C"
-{
#include "../../../../C/7zCrc.h"
#include "../../../../C/Alloc.h"
-}
#include "../../../Common/MyCom.h"
@@ -575,22 +572,22 @@ HRESULT CEncoderInfo::Init(UInt32 dictionarySize, UInt32 numThreads, CBaseRandom
PROPID propIDs[] =
{
NCoderPropID::kDictionarySize,
- NCoderPropID::kMultiThread
+ NCoderPropID::kNumThreads
};
const int kNumProps = sizeof(propIDs) / sizeof(propIDs[0]);
- PROPVARIANT properties[kNumProps];
- properties[0].vt = VT_UI4;
- properties[0].ulVal = (UInt32)dictionarySize;
+ PROPVARIANT props[kNumProps];
+ props[0].vt = VT_UI4;
+ props[0].ulVal = dictionarySize;
- properties[1].vt = VT_BOOL;
- properties[1].boolVal = (numThreads > 1) ? VARIANT_TRUE : VARIANT_FALSE;
+ props[1].vt = VT_UI4;
+ props[1].ulVal = numThreads;
{
CMyComPtr<ICompressSetCoderProperties> setCoderProperties;
RINOK(encoder.QueryInterface(IID_ICompressSetCoderProperties, &setCoderProperties));
if (!setCoderProperties)
return E_FAIL;
- RINOK(setCoderProperties->SetCoderProperties(propIDs, properties, kNumProps));
+ RINOK(setCoderProperties->SetCoderProperties(propIDs, props, kNumProps));
CMyComPtr<ICompressWriteCoderProperties> writeCoderProperties;
encoder.QueryInterface(IID_ICompressWriteCoderProperties, &writeCoderProperties);