Title: [151689] trunk/Source/WTF
- Revision
- 151689
- Author
- [email protected]
- Date
- 2013-06-18 12:58:32 -0700 (Tue, 18 Jun 2013)
Log Message
PackedIntVector: check template arguments at compile time
https://bugs.webkit.org/show_bug.cgi?id=117737
Use 'COMPILE_ASSERT' instead of 'ASSERT' in PackedIntVector class
constructor.
Reviewed by Sam Weinig.
* wtf/PackedIntVector.h:
(WTF::PackedIntVector::PackedIntVector):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (151688 => 151689)
--- trunk/Source/WTF/ChangeLog 2013-06-18 19:38:01 UTC (rev 151688)
+++ trunk/Source/WTF/ChangeLog 2013-06-18 19:58:32 UTC (rev 151689)
@@ -1,3 +1,16 @@
+2013-06-18 Mikhail Pozdnyakov <[email protected]>
+
+ PackedIntVector: check template arguments at compile time
+ https://bugs.webkit.org/show_bug.cgi?id=117737
+
+ Use 'COMPILE_ASSERT' instead of 'ASSERT' in PackedIntVector class
+ constructor.
+
+ Reviewed by Sam Weinig.
+
+ * wtf/PackedIntVector.h:
+ (WTF::PackedIntVector::PackedIntVector):
+
2013-06-17 Andy Estes <[email protected]>
A static_assert() in RetainPtr.h sometimes causes the build to fail.
Modified: trunk/Source/WTF/wtf/PackedIntVector.h (151688 => 151689)
--- trunk/Source/WTF/wtf/PackedIntVector.h 2013-06-18 19:38:01 UTC (rev 151688)
+++ trunk/Source/WTF/wtf/PackedIntVector.h 2013-06-18 19:58:32 UTC (rev 151689)
@@ -42,8 +42,8 @@
public:
PackedIntVector()
{
- ASSERT(bitCount);
- ASSERT(bitCount < sizeof(void*) * 8);
+ COMPILE_ASSERT(bitCount, bitCount_shall_not_be_zero);
+ COMPILE_ASSERT(bitCount < sizeof(void*) * 8, bitCount_shall_not_exceed_address_space_limit);
}
PackedIntVector(const PackedIntVector& other)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes