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

Unified Diff: samplecode/SampleApp.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 | « include/private/SkRecords.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleApp.cpp
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index c985b1eb09677dd30a10322bb389b8b15d697623..1d4bd1e705376a7643c978c6bb6dd956fc110fc4 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -598,8 +598,8 @@ static const struct TilingInfo gTilingInfo[] = {
{ "1/1x1/16" , SK_Scalar1 , SK_Scalar1 / 16 }, // kRel_1x16_Tiling
{ "1/16x1/1" , SK_Scalar1 / 16 , SK_Scalar1 }, // kRel_16x1_Tiling
};
-SK_COMPILE_ASSERT((SK_ARRAY_COUNT(gTilingInfo) == kLast_TilingMode_Enum),
- Incomplete_tiling_labels);
+static_assert((SK_ARRAY_COUNT(gTilingInfo) == kLast_TilingMode_Enum),
+ "Incomplete_tiling_labels");
SkSize SampleWindow::tileSize() const {
SkASSERT((TilingMode)fTilingMode < kLast_TilingMode_Enum);
@@ -673,7 +673,7 @@ static inline SampleWindow::DeviceType cycle_devicetype(SampleWindow::DeviceType
#endif // SK_SUPPORT_GPU
SampleWindow::kRaster_DeviceType,
};
- SK_COMPILE_ASSERT(SK_ARRAY_COUNT(gCT) == SampleWindow::kDeviceTypeCnt, array_size_mismatch);
+ static_assert(SK_ARRAY_COUNT(gCT) == SampleWindow::kDeviceTypeCnt, "array_size_mismatch");
return gCT[ct];
}
@@ -1942,8 +1942,8 @@ static const char* gDeviceTypePrefix[] = {
#endif // SK_ANGLE
#endif // SK_SUPPORT_GPU
};
-SK_COMPILE_ASSERT(SK_ARRAY_COUNT(gDeviceTypePrefix) == SampleWindow::kDeviceTypeCnt,
- array_size_mismatch);
+static_assert(SK_ARRAY_COUNT(gDeviceTypePrefix) == SampleWindow::kDeviceTypeCnt,
+ "array_size_mismatch");
static const char* trystate_str(SkOSMenu::TriState state,
const char trueStr[], const char falseStr[]) {
« no previous file with comments | « include/private/SkRecords.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698