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

Unified Diff: src/core/SkPaint.cpp

Issue 1306443004: Use static_assert instead of SK_COMPILE_ASSERT. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 | « src/core/SkMatrix.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPaint.cpp
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index f64ab1d844784a02b1028ad5cdf16dd6fc0080f1..6c1323c592699baa77da05a8c4d92efd724cbf48 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -2419,8 +2419,8 @@ bool SkPaint::nothingToDraw() const {
uint32_t SkPaint::getHash() const {
// We're going to hash 10 pointers and 7 32-bit values, finishing up with fBitfields,
// so fBitfields should be 10 pointers and 6 32-bit values from the start.
- SK_COMPILE_ASSERT(offsetof(SkPaint, fBitfields) == 10 * sizeof(void*) + 6 * sizeof(uint32_t),
- SkPaint_notPackedTightly);
+ static_assert(offsetof(SkPaint, fBitfields) == 10 * sizeof(void*) + 6 * sizeof(uint32_t),
+ "SkPaint_notPackedTightly");
return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this),
offsetof(SkPaint, fBitfields) + sizeof(fBitfields));
}
« no previous file with comments | « src/core/SkMatrix.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698