MCPcopy Create free account
hub / github.com/OSGeo/gdal / CPLHashSetHashStr

Function CPLHashSetHashStr

port/cpl_hash_set.cpp:527–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525 */
526
527CPL_NOSANITIZE_UNSIGNED_INT_OVERFLOW
528unsigned long CPLHashSetHashStr(const void *elt)
529{
530 if (elt == nullptr)
531 return 0;
532
533 const unsigned char *pszStr = static_cast<const unsigned char *>(elt);
534 unsigned long hash = 0;
535
536 int c = 0;
537 while ((c = *pszStr++) != '\0')
538 hash = c + (hash << 6) + (hash << 16) - hash;
539
540 return hash;
541}
542
543/************************************************************************/
544/* CPLHashSetEqualStr() */

Callers 14

OGRAmigoCloudFIDMethod · 0.85
GMLHandlerMethod · 0.85
IsGeometryElementMethod · 0.85
OGRPGHashTableEntryFunction · 0.85
hash_func_get_metadataFunction · 0.85
__xstatFunction · 0.85
__lxstatFunction · 0.85
__xstat64Function · 0.85
__fxstatFunction · 0.85
__fxstat64Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected