KiCad PCB EDA Suite
WXSTRING_HASH Struct Reference

Hash function for wxString, counterpart of std::string hash. More...

#include <hashtables.h>

Inheritance diagram for WXSTRING_HASH:

Public Member Functions

std::size_t operator() (const wxString &aString) const
 

Detailed Description

Hash function for wxString, counterpart of std::string hash.

Definition at line 81 of file hashtables.h.

Member Function Documentation

std::size_t WXSTRING_HASH::operator() ( const wxString &  aString) const
inline

Definition at line 83 of file hashtables.h.

84  {
85  std::size_t hash = 2166136261u;
86 
87  for( wxString::const_iterator it = aString.begin(); it != aString.end(); ++it )
88  {
89  unsigned ch = static_cast<unsigned>( *it );
90  hash ^= ch;
91  hash *= 16777619;
92  }
93  return hash;
94  }

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