Changeset View
Changeset View
Standalone View
Standalone View
extern/draco/draco/src/draco/core/hash_utils.cc
- This file was moved from extern/draco/dracoenc/src/draco/core/hash_utils.cc.
| Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | if (num_chars_left > 7) { | ||||
| new_hash |= static_cast<uint64_t>(s[off + j]) | new_hash |= static_cast<uint64_t>(s[off + j]) | ||||
| << (64 - ((num_chars_left - j) * 8)); | << (64 - ((num_chars_left - j) * 8)); | ||||
| } | } | ||||
| } | } | ||||
| hash = HashCombine(new_hash, hash); | hash = HashCombine(new_hash, hash); | ||||
| } | } | ||||
| if (hash < std::numeric_limits<uint64_t>::max() - 1) | if (hash < std::numeric_limits<uint64_t>::max() - 1) { | ||||
| hash += 2; | hash += 2; | ||||
| } | |||||
| return hash; | return hash; | ||||
| } | } | ||||
| } // namespace draco | } // namespace draco | ||||