Skip to content

Commit

Permalink
Merge pull request #2317 from animalize/msvc_inline
Browse files Browse the repository at this point in the history
Let MSVC force inline ZSTD_hashPtr() function
  • Loading branch information
Cyan4973 authored Sep 30, 2020
2 parents 6932216 + 2e5d73d commit cc88eb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/compress/zstd_compress_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,8 @@ static const U64 prime8bytes = 0xCF1BBCDCB7A56463ULL;
static size_t ZSTD_hash8(U64 u, U32 h) { return (size_t)(((u) * prime8bytes) >> (64-h)) ; }
static size_t ZSTD_hash8Ptr(const void* p, U32 h) { return ZSTD_hash8(MEM_readLE64(p), h); }

MEM_STATIC size_t ZSTD_hashPtr(const void* p, U32 hBits, U32 mls)
MEM_STATIC FORCE_INLINE_ATTR
size_t ZSTD_hashPtr(const void* p, U32 hBits, U32 mls)
{
switch(mls)
{
Expand Down

0 comments on commit cc88eb7

Please sign in to comment.