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

Unified Diff: third_party/WebKit/Source/wtf/SizeLimits.cpp

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/SaturatedArithmeticTest.cpp ('k') | third_party/WebKit/Source/wtf/SpinLock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/SizeLimits.cpp
diff --git a/third_party/WebKit/Source/wtf/SizeLimits.cpp b/third_party/WebKit/Source/wtf/SizeLimits.cpp
index afb8fed6eb0e774f5339edc5c843a0a9bd5d9a24..faf122b27488a7274265e99021d20fe911c60d37 100644
--- a/third_party/WebKit/Source/wtf/SizeLimits.cpp
+++ b/third_party/WebKit/Source/wtf/SizeLimits.cpp
@@ -44,47 +44,59 @@ namespace WTF {
#if ENABLE(ASSERT) || ENABLE(SECURITY_ASSERT)
// The debug/assertion version may get bigger.
struct SameSizeAsRefCounted {
- int a;
+ int a;
#if ENABLE(SECURITY_ASSERT)
- bool b;
+ bool b;
#endif
#if ENABLE(ASSERT)
- bool c;
- ThreadRestrictionVerifier d;
+ bool c;
+ ThreadRestrictionVerifier d;
#endif
};
#else
struct SameSizeAsRefCounted {
- int a;
- // Don't add anything here because this should stay small.
+ int a;
+ // Don't add anything here because this should stay small.
};
#endif
-template<typename T, unsigned inlineCapacity = 0>
+template <typename T, unsigned inlineCapacity = 0>
struct SameSizeAsVectorWithInlineCapacity;
-template<typename T>
+template <typename T>
struct SameSizeAsVectorWithInlineCapacity<T, 0> {
- void* bufferPointer;
- unsigned capacity;
- unsigned size;
+ void* bufferPointer;
+ unsigned capacity;
+ unsigned size;
};
-template<typename T, unsigned inlineCapacity>
+template <typename T, unsigned inlineCapacity>
struct SameSizeAsVectorWithInlineCapacity {
- SameSizeAsVectorWithInlineCapacity<T, 0> baseCapacity;
+ SameSizeAsVectorWithInlineCapacity<T, 0> baseCapacity;
#if !defined(ANNOTATE_CONTIGUOUS_CONTAINER)
- AlignedBuffer<inlineCapacity * sizeof(T), WTF_ALIGN_OF(T)> inlineBuffer;
+ AlignedBuffer<inlineCapacity * sizeof(T), WTF_ALIGN_OF(T)> inlineBuffer;
#endif
};
static_assert(sizeof(OwnPtr<int>) == sizeof(int*), "OwnPtr should stay small");
-static_assert(sizeof(PassRefPtr<RefCounted<int>>) == sizeof(int*), "PassRefPtr should stay small");
-static_assert(sizeof(RefCounted<int>) == sizeof(SameSizeAsRefCounted), "RefCounted should stay small");
-static_assert(sizeof(RefPtr<RefCounted<int>>) == sizeof(int*), "RefPtr should stay small");
+static_assert(sizeof(PassRefPtr<RefCounted<int>>) == sizeof(int*),
+ "PassRefPtr should stay small");
+static_assert(sizeof(RefCounted<int>) == sizeof(SameSizeAsRefCounted),
+ "RefCounted should stay small");
+static_assert(sizeof(RefPtr<RefCounted<int>>) == sizeof(int*),
+ "RefPtr should stay small");
static_assert(sizeof(String) == sizeof(int*), "String should stay small");
-static_assert(sizeof(AtomicString) == sizeof(String), "AtomicString should stay small");
-static_assert(sizeof(Vector<int>) == sizeof(SameSizeAsVectorWithInlineCapacity<int>), "Vector should stay small");
-static_assert(sizeof(Vector<int, 1>) == sizeof(SameSizeAsVectorWithInlineCapacity<int, 1>), "Vector should stay small");
-static_assert(sizeof(Vector<int, 2>) == sizeof(SameSizeAsVectorWithInlineCapacity<int, 2>), "Vector should stay small");
-static_assert(sizeof(Vector<int, 3>) == sizeof(SameSizeAsVectorWithInlineCapacity<int, 3>), "Vector should stay small");
+static_assert(sizeof(AtomicString) == sizeof(String),
+ "AtomicString should stay small");
+static_assert(sizeof(Vector<int>) ==
+ sizeof(SameSizeAsVectorWithInlineCapacity<int>),
+ "Vector should stay small");
+static_assert(sizeof(Vector<int, 1>) ==
+ sizeof(SameSizeAsVectorWithInlineCapacity<int, 1>),
+ "Vector should stay small");
+static_assert(sizeof(Vector<int, 2>) ==
+ sizeof(SameSizeAsVectorWithInlineCapacity<int, 2>),
+ "Vector should stay small");
+static_assert(sizeof(Vector<int, 3>) ==
+ sizeof(SameSizeAsVectorWithInlineCapacity<int, 3>),
+ "Vector should stay small");
}
« no previous file with comments | « third_party/WebKit/Source/wtf/SaturatedArithmeticTest.cpp ('k') | third_party/WebKit/Source/wtf/SpinLock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698