Move declaration of 1 to an inlined cast

This commit is contained in:
Danila Kutenin
2021-05-29 20:55:37 +01:00
parent a80d268700
commit 444f4db955
+1 -2
View File
@@ -338,8 +338,7 @@ MEM_STATIC FORCE_INLINE_ATTR size_t BIT_getMiddleBits(size_t bitContainer, U32 c
* importance. * importance.
*/ */
#if defined(__x86_64__) || defined(_M_X86) #if defined(__x86_64__) || defined(_M_X86)
U64 const one = 1; return (bitContainer >> (start & regMask)) & ((((U64)1) << nbBits) - 1);
return (bitContainer >> (start & regMask)) & ((one << nbBits) - 1);
#else #else
return (bitContainer >> (start & regMask)) & BIT_mask[nbBits]; return (bitContainer >> (start & regMask)) & BIT_mask[nbBits];
#endif #endif