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 48 of file hashtables.h.

Member Function Documentation

◆ operator()()

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

Definition at line 65 of file hashtables.h.

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

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