diff options
author | remittor <remittor@gmail.com> | 2020-10-07 06:52:40 (GMT) |
---|---|---|
committer | remittor <remittor@gmail.com> | 2020-10-07 06:52:40 (GMT) |
commit | 0e3933edd435c54cc2e21e38f5d4ba7bf644a24e (patch) | |
tree | 573585e4bbd6e084541db2e1332f711da98a7c58 /lib/lz4hc.c | |
parent | 749bd91a06be385b6485bfc7fe94e8a86b3ed13a (diff) | |
download | lz4-0e3933edd435c54cc2e21e38f5d4ba7bf644a24e.zip lz4-0e3933edd435c54cc2e21e38f5d4ba7bf644a24e.tar.gz lz4-0e3933edd435c54cc2e21e38f5d4ba7bf644a24e.tar.bz2 |
Replace "static" to "LZ4_FORCE_INLINE" for small functions
The "static" specifier does not guarantee that the function will be inlined.
Diffstat (limited to 'lib/lz4hc.c')
-rw-r--r-- | lib/lz4hc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c index cd802d8..8e3bd70 100644 --- a/lib/lz4hc.c +++ b/lib/lz4hc.c @@ -158,7 +158,7 @@ int LZ4HC_countBack(const BYTE* const ip, const BYTE* const match, #endif -static U32 LZ4HC_rotatePattern(size_t const rotate, U32 const pattern) +LZ4_FORCE_INLINE U32 LZ4HC_rotatePattern(size_t const rotate, U32 const pattern) { size_t const bitsToRotate = (rotate & (sizeof(pattern) - 1)) << 3; if (bitsToRotate == 0) @@ -223,7 +223,7 @@ LZ4HC_reverseCountPattern(const BYTE* ip, const BYTE* const iLow, U32 pattern) * 4 byte MINMATCH would overflow. * @returns true if the match index is okay. */ -static int LZ4HC_protectDictEnd(U32 const dictLimit, U32 const matchIndex) +LZ4_FORCE_INLINE int LZ4HC_protectDictEnd(U32 const dictLimit, U32 const matchIndex) { return ((U32)((dictLimit - 1) - matchIndex) >= 3); } |