This commit is contained in:
Igor Pavlov
2015-10-05 00:00:00 +00:00
committed by Kornel Lesiński
parent f6444c3256
commit 6543c28020
113 changed files with 3101 additions and 382 deletions

View File

@@ -8,7 +8,6 @@
#include "../../Common/MyCom.h"
#include "../../Windows/Defs.h"
#include "../../Windows/PropVariant.h"
#include "../ICoder.h"
@@ -23,7 +22,7 @@ extern const CHasherInfo *g_Hashers[];
static void SetPropFromAscii(const char *s, PROPVARIANT *prop) throw()
{
UINT len = (UINT)strlen(s);
OLECHAR *dest = ::SysAllocStringLen(NULL, len);
BSTR dest = ::SysAllocStringLen(NULL, len);
if (dest)
{
for (UINT i = 0; i <= len; i++)

View File

@@ -10,7 +10,7 @@
static HRESULT SResToHRESULT(SRes res)
{
switch(res)
switch (res)
{
case SZ_OK: return S_OK;
case SZ_ERROR_MEM: return E_OUTOFMEMORY;

View File

@@ -10,7 +10,7 @@
static HRESULT SResToHRESULT(SRes res)
{
switch(res)
switch (res)
{
case SZ_OK: return S_OK;
case SZ_ERROR_MEM: return E_OUTOFMEMORY;

View File

@@ -457,17 +457,16 @@ HRESULT CDecoder::CodeSpec(UInt32 curSize)
HRESULT CDecoder::Code(const Byte *inData, size_t inSize, UInt32 outSize)
{
if (_pos == _winSize)
{
_pos = 0;
_overDict = true;
}
if (!_keepHistory)
{
_pos = 0;
_overDict = false;
}
else if (_pos == _winSize)
{
_pos = 0;
_overDict = true;
}
_writePos = _pos;
_unpackedData = _win + _pos;

View File

@@ -49,7 +49,7 @@ STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *props, UInt32 size)
HRESULT CDecoder::CodeSpec(Byte *memStream, UInt32 size)
{
switch(_status)
switch (_status)
{
case kStatus_Finished: return S_OK;
case kStatus_Error: return S_FALSE;

View File

@@ -56,7 +56,7 @@ Byte CFilter::Decode(int &channelDelta, Byte deltaByte)
Dif[i] = 0;
}
switch(numMinDif)
switch (numMinDif)
{
case 1: if (K1 >= -16) K1--; break;
case 2: if (K1 < 16) K1++; break;

View File

@@ -254,7 +254,7 @@ public:
_winPos += len;
do
*dest++ = *src++;
while(--len != 0);
while (--len != 0);
return;
}
do
@@ -263,7 +263,7 @@ public:
winPos = (winPos + 1) & kWindowMask;
pos = (pos + 1) & kWindowMask;
}
while(--len != 0);
while (--len != 0);
_winPos = winPos;
}

View File

@@ -23,7 +23,7 @@ void CBitDecoder::Prepare2() throw()
size_t rem = _bufLim - _buf;
if (rem != 0)
memcpy(_bufBase, _buf, rem);
memmove(_bufBase, _buf, rem);
_bufLim = _bufBase + rem;
_processedSize += (_buf - _bufBase);