MCPcopy Create free account
hub / github.com/FastLED/FastLED / hashSubcaseSignature

Function hashSubcaseSignature

src/fl/test/fltest.h:150–160  ·  view source on GitHub ↗

Hash function for SubcaseSignature

Source from the content-addressed store, hash-verified

148
149// Hash function for SubcaseSignature
150inline fl::u32 hashSubcaseSignature(const SubcaseSignature& sig) FL_NOEXCEPT {
151 fl::u32 hash = 0;
152 for (const char* p = sig.mName; *p; ++p) {
153 hash = hash * 31 + static_cast<fl::u32>(*p);
154 }
155 for (const char* p = sig.mFile; *p; ++p) {
156 hash = hash * 31 + static_cast<fl::u32>(*p);
157 }
158 hash = hash * 31 + static_cast<fl::u32>(sig.mLine);
159 return hash;
160}
161
162// =============================================================================
163// Timeout support types

Callers 1

hashCurrentPathMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected