MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / Hash

Method Hash

scintilla/src/PositionCache.cxx:507–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505}
506
507int PositionCacheEntry::Hash(unsigned int styleNumber_, const char *s, unsigned int len_) {
508 unsigned int ret = s[0] << 7;
509 for (unsigned int i=0; i<len_; i++) {
510 ret *= 1000003;
511 ret ^= s[i];
512 }
513 ret *= 1000003;
514 ret ^= len_;
515 ret *= 1000003;
516 ret ^= styleNumber_;
517 return ret;
518}
519
520bool PositionCacheEntry::NewerThan(const PositionCacheEntry &other) const {
521 return clock > other.clock;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected