| Index: third_party/WebKit/Source/wtf/BitwiseOperations.h
|
| diff --git a/third_party/WebKit/Source/wtf/BitwiseOperations.h b/third_party/WebKit/Source/wtf/BitwiseOperations.h
|
| index 312cef3b8494416b6154b284bef4877747fea312..2e6d2774fe1a002f2e97f16275c70394b6758efa 100644
|
| --- a/third_party/WebKit/Source/wtf/BitwiseOperations.h
|
| +++ b/third_party/WebKit/Source/wtf/BitwiseOperations.h
|
| @@ -50,19 +50,17 @@ namespace WTF {
|
|
|
| #if COMPILER(MSVC)
|
|
|
| -ALWAYS_INLINE uint32_t countLeadingZeros32(uint32_t x)
|
| -{
|
| - unsigned long index;
|
| - return LIKELY(_BitScanReverse(&index, x)) ? (31 - index) : 32;
|
| +ALWAYS_INLINE uint32_t countLeadingZeros32(uint32_t x) {
|
| + unsigned long index;
|
| + return LIKELY(_BitScanReverse(&index, x)) ? (31 - index) : 32;
|
| }
|
|
|
| #if CPU(64BIT)
|
|
|
| // MSVC only supplies _BitScanForward64 when building for a 64-bit target.
|
| -ALWAYS_INLINE uint64_t countLeadingZeros64(uint64_t x)
|
| -{
|
| - unsigned long index;
|
| - return LIKELY(_BitScanReverse64(&index, x)) ? (63 - index) : 64;
|
| +ALWAYS_INLINE uint64_t countLeadingZeros64(uint64_t x) {
|
| + unsigned long index;
|
| + return LIKELY(_BitScanReverse64(&index, x)) ? (63 - index) : 64;
|
| }
|
|
|
| #endif
|
| @@ -74,28 +72,30 @@ ALWAYS_INLINE uint64_t countLeadingZeros64(uint64_t x)
|
| // though nascent processor clz instructions have defined behaviour for 0.
|
| // We could drop to raw __asm__ to do better, but we'll avoid doing that unless
|
| // we see proof that we need to.
|
| -ALWAYS_INLINE uint32_t countLeadingZeros32(uint32_t x)
|
| -{
|
| - return LIKELY(x) ? __builtin_clz(x) : 32;
|
| +ALWAYS_INLINE uint32_t countLeadingZeros32(uint32_t x) {
|
| + return LIKELY(x) ? __builtin_clz(x) : 32;
|
| }
|
|
|
| -ALWAYS_INLINE uint64_t countLeadingZeros64(uint64_t x)
|
| -{
|
| - return LIKELY(x) ? __builtin_clzll(x) : 64;
|
| +ALWAYS_INLINE uint64_t countLeadingZeros64(uint64_t x) {
|
| + return LIKELY(x) ? __builtin_clzll(x) : 64;
|
| }
|
|
|
| #endif
|
|
|
| #if CPU(64BIT)
|
|
|
| -ALWAYS_INLINE size_t countLeadingZerosSizet(size_t x) { return countLeadingZeros64(x); }
|
| +ALWAYS_INLINE size_t countLeadingZerosSizet(size_t x) {
|
| + return countLeadingZeros64(x);
|
| +}
|
|
|
| #else
|
|
|
| -ALWAYS_INLINE size_t countLeadingZerosSizet(size_t x) { return countLeadingZeros32(x); }
|
| +ALWAYS_INLINE size_t countLeadingZerosSizet(size_t x) {
|
| + return countLeadingZeros32(x);
|
| +}
|
|
|
| #endif
|
|
|
| -} // namespace WTF
|
| +} // namespace WTF
|
|
|
| -#endif // WTF_BitwiseOperations_h
|
| +#endif // WTF_BitwiseOperations_h
|
|
|