Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 336 vs 337 for /trunk/Source Code/Utility/Headers/CRC.h

Diff revisions: vs.
  @@ -21,7 +21,7 @@
21 21 */
22 22
23 23 /*Code references:
24 - http://www.cplusplus.com/forum/lounge/27570/
24 + http://www.cplusplus.com/forum/lounge/27570/
25 25 */
26 26 #ifndef UTIL_CRC_H_
27 27 #define UTIL_CRC_H_
  @@ -30,35 +30,35 @@
30 30
31 31 namespace Divide {
32 32 namespace Util {
33 - class CRC32 {
34 - public:
35 - //=========================================
36 - // ctors
37 - inline CRC32() { Reset(); }
38 - inline CRC32(const void* buf, size_t siz) { Reset(); Hash(buf,siz); }
39 -
40 - //=========================================
41 - /// implicit cast, so that you can do something like foo = CRC(dat,siz);
42 - inline operator U32 () const { return Get(); }
43 -
44 - //=========================================
45 - /// getting the crc
46 - inline U32 Get() const { return ~mCrc; }
47 -
48 - //=========================================
49 - // HashBase stuff
50 - virtual void Reset() { mCrc = (U32)~0; }
51 - virtual void Hash(const void* buf,size_t siz);
52 -
53 - private:
54 - U32 mCrc;
55 - static U32 mTable[0x100];
56 -
57 - private:
58 - //=========================================
59 - // internal support
60 - static U32 Reflect(U32 v,I32 bits);
61 - };
33 + class CRC32 {
34 + public:
35 + //=========================================
36 + // ctors
37 + inline CRC32() { Reset(); }
38 + inline CRC32(const void* buf, size_t siz) { Reset(); Hash(buf,siz); }
39 +
40 + //=========================================
41 + /// implicit cast, so that you can do something like foo = CRC(dat,siz);
42 + inline operator U32 () const { return Get(); }
43 +
44 + //=========================================
45 + /// getting the crc
46 + inline U32 Get() const { return ~mCrc; }
47 +
48 + //=========================================
49 + // HashBase stuff
50 + virtual void Reset() { mCrc = (U32)~0; }
51 + virtual void Hash(const void* buf,size_t siz);
52 +
53 + private:
54 + U32 mCrc;
55 + static U32 mTable[0x100];
56 +
57 + private:
58 + //=========================================
59 + // internal support
60 + static U32 Reflect(U32 v,I32 bits);
61 + };
62 62 }; //namespace Util
63 63 }; //namespace Divide
64 64