Example #1
0
UINT32 save_manager::signature() const
{
    // iterate over entries
    UINT32 crc = 0;
    for (state_entry *entry = m_entry_list.first(); entry != NULL; entry = entry->next())
    {
        // add the entry name to the CRC
        crc = core_crc32(crc, (UINT8 *)entry->m_name.c_str(), entry->m_name.length());

        // add the type and size to the CRC
        UINT32 temp[2];
        temp[0] = LITTLE_ENDIANIZE_INT32(entry->m_typecount);
        temp[1] = LITTLE_ENDIANIZE_INT32(entry->m_typesize);
        crc = core_crc32(crc, (UINT8 *)&temp[0], sizeof(temp));
    }
    return crc;
}
Example #2
0
static inline UINT32 get_hash(const char *string)
{
	return core_crc32(0, (UINT8 *)string, (UINT32)strlen(string));
}
Example #3
0
INLINE UINT32 get_hash(const char *string)
{
	return core_crc32(0, (UINT8 *)string, (UINT32)strlen(string));
}