Skip to content

Commit dfe4832

Browse files
committed
minor cleanup
1 parent 3d5f49b commit dfe4832

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

include/utils/hasher.hpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,12 @@ struct hash128 {
8383
uint64_t m_first, m_second;
8484
};
8585

86-
struct byte_range {
87-
uint8_t const* begin;
88-
uint8_t const* end;
89-
};
90-
9186
struct xxhash_64 {
9287
typedef hash64 hash_type;
9388

9489
// generic range of bytes
95-
static inline hash64 hash(byte_range const& range, uint64_t seed) {
96-
return XXH64(range.begin, range.end - range.begin, seed);
90+
static inline hash64 hash(uint8_t const* begin, uint8_t const* end, uint64_t seed) {
91+
return XXH64(begin, end - begin, seed);
9792
}
9893

9994
// specialization for std::string
@@ -111,8 +106,8 @@ struct xxhash_128 {
111106
typedef hash128 hash_type;
112107

113108
// generic range of bytes
114-
static inline hash128 hash(byte_range const& range, uint64_t seed) {
115-
return XXH128(range.begin, range.end - range.begin, seed);
109+
static inline hash128 hash(uint8_t const* begin, uint8_t const* end, uint64_t seed) {
110+
return XXH128(begin, end - begin, seed);
116111
}
117112

118113
// specialization for std::string

0 commit comments

Comments
 (0)