Example #1
0
void RemoteConnection_mapTrackName(const char* name)
{
	int count = s_nameLookup.count;

	if (findTrack(name) != -1)
		return;

	s_nameLookup.hashes[count] = quickHash(name);
	s_nameLookup.ids[count] = s_clientIndex++;
	s_nameLookup.count++;
}
Example #2
0
int findTrack(const char* name)
{
	uint32_t i, count, hash = quickHash(name);

	for (i = 0, count = s_nameLookup.count; i < count; ++i)
	{
		if (hash == s_nameLookup.hashes[i])
			return s_nameLookup.ids[i];
	}

	return -1;
}
Example #3
0
 std::vector<unsigned char> operator()( HASH_FUNCTION _type,
                                        std::vector<unsigned char> _binary ) {
    return quickHash( _type, _binary );
 }
Example #4
0
 std::vector<unsigned char> operator()( HASH_FUNCTION _type, std::string _message ) {
    return quickHash( _type, _message );
 }