KiCad PCB EDA Suite
WXSTRING_HASH Struct Reference

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

#include <hashtables.h>

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

Member Function Documentation

◆ operator()()

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

Definition at line 82 of file hashtables.h.

83 {
84 std::size_t hash = 2166136261u;
85
86 for( const wxUniChar c : aString )
87 {
88 unsigned ch = static_cast<unsigned>( c );
89 hash ^= ch;
90 hash *= 16777619;
91 }
92 return hash;
93 }

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