diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-08-21 15:19:01 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-08-21 15:19:01 +0200 |
| commit | b6ce3d25357b4e01daf212a955a6093133bc2fe4 (patch) | |
| tree | ffbcf391bf186ee0c75dc982cd36da070a5159cb /dev/kernel/src/FS | |
| parent | 738833a0470ce93b7809ca4bdea253677f27fb57 (diff) | |
feat: Reworked `hefsi_hash_64` to follow the codebase's conventions.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/src/FS')
| -rw-r--r-- | dev/kernel/src/FS/HeFS+FileSystemParser.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dev/kernel/src/FS/HeFS+FileSystemParser.cc b/dev/kernel/src/FS/HeFS+FileSystemParser.cc index 344369d5..f1531b4c 100644 --- a/dev/kernel/src/FS/HeFS+FileSystemParser.cc +++ b/dev/kernel/src/FS/HeFS+FileSystemParser.cc @@ -91,14 +91,14 @@ namespace Detail { STATIC UInt64 hefsi_hash_64(const Utf8Char* path) { if (!path || *path == 0) return 0; - const UInt64 FNV_OFFSET_BASIS = 0xcbf29ce484222325ULL; - const UInt64 FNV_PRIME = 0x100000001b3ULL; + const UInt64 kFnvBaseOffset = 0xcbf29ce484222325ULL; + const UInt64 kFnvPrimeNumber = 0x100000001b3ULL; - UInt64 hash = FNV_OFFSET_BASIS; + UInt64 hash = kFnvBaseOffset; while (*path) { hash ^= (Utf8Char) (*path++); - hash *= FNV_PRIME; + hash *= kFnvPrimeNumber; } return hefsi_to_big_endian_64(hash); |
