KiCad PCB EDA Suite
fnv_1a Struct Reference

Very fast and efficient hash function for "const char*" type, used in specialized KEYWORD_MAP below. More...

#include <hashtables.h>

Public Member Functions

std::size_t operator() (const char *it) const
 

Detailed Description

Very fast and efficient hash function for "const char*" type, used in specialized KEYWORD_MAP below.

taken from: http://www.boost.org/doc/libs/1_53_0/libs/unordered/examples/fnv1.hpp

Definition at line 49 of file hashtables.h.

Member Function Documentation

std::size_t fnv_1a::operator() ( const char *  it) const
inline

Definition at line 66 of file hashtables.h.

67  {
68  std::size_t hash = 2166136261u;
69 
70  for( ; *it; ++it )
71  {
72  hash ^= (unsigned char) *it;
73  hash *= 16777619;
74  }
75  return hash;
76  }

The documentation for this struct was generated from the following file: