Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
K0R0L committed Jan 24, 2019
1 parent 8996935 commit 19dabff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions DesktopEditor/common/CalculatorCRC32.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ class CCalculatorCRC32
{
m_dwMagicWord = 0xEDB88320;
m_dwInitCrc = 0xFFFFFFFF;
m_bInitTable = FALSE;
m_bInitTable = false;
}
public:
unsigned int Calc(const unsigned char* pStream, int nSize)
unsigned int Calc(const unsigned char* pStream, unsigned int nSize)
{
InitCRCTable();
unsigned int dwRes = m_dwInitCrc;
for (int i=0;i<nSize;i++)
for (unsigned int i=0;i<nSize;i++)
{
dwRes = m_arCRCTable[(dwRes ^ pStream[i])& 0xFF] ^ (dwRes >> 8);
}
Expand Down Expand Up @@ -77,6 +77,7 @@ class CCalculatorCRC32
}
m_arCRCTable[i] = dwTemp;
}
m_bInitTable = true;
}

unsigned int m_dwMagicWord;
Expand Down

0 comments on commit 19dabff

Please sign in to comment.