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

Unified Diff: gm/aarectmodes.cpp

Issue 2300623005: Replace a lot of 'static const' with 'constexpr' or 'const'. (Closed)
Patch Set: small msvc concession Created 4 years, 3 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 | « no previous file | gm/aaxfermodes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/aarectmodes.cpp
diff --git a/gm/aarectmodes.cpp b/gm/aarectmodes.cpp
index 10fa15a5effbd81d1c08b3b4039e69beb015fa96..6e9f4bf6001b95295830470e3df5a20e768faf29 100644
--- a/gm/aarectmodes.cpp
+++ b/gm/aarectmodes.cpp
@@ -58,7 +58,7 @@ static void test4(SkCanvas* canvas) {
canvas->drawPath(path, paint);
}
-static const struct {
+constexpr struct {
SkXfermode::Mode fMode;
const char* fLabel;
} gModes[] = {
@@ -140,7 +140,7 @@ namespace skiagm {
test4(canvas);
}
const SkRect bounds = SkRect::MakeWH(W, H);
- static const SkAlpha gAlphaValue[] = { 0xFF, 0x88, 0x88 };
+ constexpr SkAlpha gAlphaValue[] = { 0xFF, 0x88, 0x88 };
canvas->translate(SkIntToScalar(4), SkIntToScalar(4));
« no previous file with comments | « no previous file | gm/aaxfermodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698