Index: Source/wtf/ListHashSet.h |
diff --git a/Source/wtf/ListHashSet.h b/Source/wtf/ListHashSet.h |
index 52b2906becfdcfe3026b9ffbaab3ba5ee5f68678..a395bbe5421f1b438212073ee31c6b9de098e924 100644 |
--- a/Source/wtf/ListHashSet.h |
+++ b/Source/wtf/ListHashSet.h |
@@ -360,7 +360,7 @@ namespace WTF { |
void* operator new(size_t, NodeAllocator* allocator) |
{ |
- COMPILE_ASSERT(sizeof(ListHashSetNode) == sizeof(ListHashSetNodeBase<ValueArg>), PleaseAddAnyFieldsToTheBase); |
+ static_assert(sizeof(ListHashSetNode) == sizeof(ListHashSetNodeBase<ValueArg>), "Please add any fields to the base"); |
Nico
2014/12/16 17:56:28
uber nit: I'd lower case the first character of th
Mostyn Bramley-Moore
2014/12/16 19:00:37
Done. Should we add this to the style guide?
|
return allocator->allocateNode(); |
} |
@@ -695,7 +695,7 @@ namespace WTF { |
template<typename T, size_t inlineCapacity, typename U, typename V> |
inline void ListHashSet<T, inlineCapacity, U, V>::finalize() |
{ |
- COMPILE_ASSERT(!Allocator::isGarbageCollected, FinalizeOnHeapAllocatedListHashSetShouldNeverBeCalled); |
+ static_assert(!Allocator::isGarbageCollected, "Heap allocated ListHashSet should never call finalize()"); |
deleteAllNodes(); |
} |
@@ -996,7 +996,7 @@ namespace WTF { |
template<typename T, size_t inlineCapacity, typename U, typename V> |
void ListHashSet<T, inlineCapacity, U, V>::trace(typename Allocator::Visitor* visitor) |
{ |
- COMPILE_ASSERT(HashTraits<T>::weakHandlingFlag == NoWeakHandlingInCollections, ListHashSetDoesNotSupportWeakness); |
+ static_assert(HashTraits<T>::weakHandlingFlag == NoWeakHandlingInCollections, "ListHashSetDoesNotSupportWeakness"); |
Nico
2014/12/16 17:56:28
intentionally no spaces here?
Mostyn Bramley-Moore
2014/12/16 19:00:37
Fixed.
|
// This marks all the nodes and their contents live that can be |
// accessed through the HashTable. That includes m_head and m_tail |
// so we do not have to explicitly trace them here. |