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

Unified Diff: Source/wtf/SizeLimits.cpp

Issue 802203004: replace COMPILE_ASSERT with static assert in wtf/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: final fixups Created 6 years 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 | « Source/wtf/PassRefPtr.h ('k') | Source/wtf/StdLibExtras.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/SizeLimits.cpp
diff --git a/Source/wtf/SizeLimits.cpp b/Source/wtf/SizeLimits.cpp
index 2f22f1edb68a64274368cc62ba49b4c7285e498f..4bab6a18ab8d35d51342716d923864a4e5c06a0c 100644
--- a/Source/wtf/SizeLimits.cpp
+++ b/Source/wtf/SizeLimits.cpp
@@ -76,14 +76,14 @@ struct SameSizeAsVectorWithInlineCapacity {
AlignedBuffer<inlineCapacity * sizeof(T), WTF_ALIGN_OF(T)> inlineBuffer;
};
-COMPILE_ASSERT(sizeof(OwnPtr<int>) == sizeof(int*), OwnPtr_should_stay_small);
-COMPILE_ASSERT(sizeof(PassRefPtr<RefCounted<int> >) == sizeof(int*), PassRefPtr_should_stay_small);
-COMPILE_ASSERT(sizeof(RefCounted<int>) == sizeof(SameSizeAsRefCounted), RefCounted_should_stay_small);
-COMPILE_ASSERT(sizeof(RefPtr<RefCounted<int> >) == sizeof(int*), RefPtr_should_stay_small);
-COMPILE_ASSERT(sizeof(String) == sizeof(int*), String_should_stay_small);
-COMPILE_ASSERT(sizeof(AtomicString) == sizeof(String), AtomicString_should_stay_small);
-COMPILE_ASSERT(sizeof(Vector<int>) == sizeof(SameSizeAsVectorWithInlineCapacity<int>), Vector_should_stay_small);
-COMPILE_ASSERT(sizeof(Vector<int, 1>) == sizeof(SameSizeAsVectorWithInlineCapacity<int, 1>), Vector_should_stay_small);
-COMPILE_ASSERT(sizeof(Vector<int, 2>) == sizeof(SameSizeAsVectorWithInlineCapacity<int, 2>), Vector_should_stay_small);
-COMPILE_ASSERT(sizeof(Vector<int, 3>) == sizeof(SameSizeAsVectorWithInlineCapacity<int, 3>), Vector_should_stay_small);
+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(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");
}
« no previous file with comments | « Source/wtf/PassRefPtr.h ('k') | Source/wtf/StdLibExtras.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698