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

Unified Diff: gm/hairmodes.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 | « gm/hairlines.cpp ('k') | gm/image.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/hairmodes.cpp
diff --git a/gm/hairmodes.cpp b/gm/hairmodes.cpp
index 2651d0410442c8c631bc0d969667cd447c11a023..de937c439b268f6877d11b7bb6f65cadc8dfc089 100644
--- a/gm/hairmodes.cpp
+++ b/gm/hairmodes.cpp
@@ -10,7 +10,7 @@
#include "SkColorPriv.h"
#include "SkShader.h"
-static const struct {
+constexpr struct {
SkXfermode::Mode fMode;
const char* fLabel;
} gModes[] = {
@@ -88,7 +88,7 @@ namespace skiagm {
void onDraw(SkCanvas* canvas) override {
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 | « gm/hairlines.cpp ('k') | gm/image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698