summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/hashing.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
commitddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch)
treea70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/lib/util/hashing.cpp
parent333bff8de64dfaeb98134000412796b4fdef970b (diff)
NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
Diffstat (limited to 'src/lib/util/hashing.cpp')
-rw-r--r--src/lib/util/hashing.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/util/hashing.cpp b/src/lib/util/hashing.cpp
index dd6b9847f15..448cdc5d6ec 100644
--- a/src/lib/util/hashing.cpp
+++ b/src/lib/util/hashing.cpp
@@ -184,7 +184,7 @@ std::string crc32_t::as_string() const
// the currently-accumulated value
//-------------------------------------------------
-void crc32_creator::append(const void *data, UINT32 length)
+void crc32_creator::append(const void *data, uint32_t length)
{
m_accum.m_raw = crc32(m_accum, reinterpret_cast<const Bytef *>(data), length);
}
@@ -236,7 +236,7 @@ std::string crc16_t::as_string() const
}
/**
- * @fn void crc16_creator::append(const void *data, UINT32 length)
+ * @fn void crc16_creator::append(const void *data, uint32_t length)
*
* @brief -------------------------------------------------
* append - hash a block of data, appending to the currently-accumulated value
@@ -246,9 +246,9 @@ std::string crc16_t::as_string() const
* @param length The length.
*/
-void crc16_creator::append(const void *data, UINT32 length)
+void crc16_creator::append(const void *data, uint32_t length)
{
- static const UINT16 s_table[256] =
+ static const uint16_t s_table[256] =
{
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7,
0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef,
@@ -284,10 +284,10 @@ void crc16_creator::append(const void *data, UINT32 length)
0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0
};
- const UINT8 *src = reinterpret_cast<const UINT8 *>(data);
+ const uint8_t *src = reinterpret_cast<const uint8_t *>(data);
// fetch the current value into a local and rip through the source data
- UINT16 crc = m_accum.m_raw;
+ uint16_t crc = m_accum.m_raw;
while (length-- != 0)
crc = (crc << 8) ^ s_table[(crc >> 8) ^ *src++];
m_accum.m_raw = crc;