src/VirtualShield.cpp
// per Paul Larson - Microsoft Research
per Paul Larson - Microsoft Research
per Paul Larson - Microsoft Research
uint16_t VirtualShield::hash(const char* s, size_t len, unsigned int seed)
{
    if (!s) { return seed; }
	uint16_t hash = seed;
	while ((len == static_cast<size_t>(-2)) ? *s : len-- > 0)
	{
		hash = hash * 101 + *s++;
	}
	return hash;
}
uint16_t VirtualShield :: hash ( const char * s , size_t len , unsigned int seed ) { if ( ! s ) { return seed ; } uint16_t hash = seed ; while ( ( len == static_cast < size_t > ( -2 ) ) ? * s : len -- > 0 ) { hash = hash * 101 + * s ++ ; } return hash ; }
per Paul Larson - Microsoft Research
per Paul Larson - Microsoft Research