Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Unified Diff: third_party/WebKit/Source/wtf/BitwiseOperations.h

Issue 1611343002: wtf reformat test Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pydent Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/wtf/BitVector.cpp ('k') | third_party/WebKit/Source/wtf/BloomFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/WebKit/Source/wtf/BitVector.cpp ('k') | third_party/WebKit/Source/wtf/BloomFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698