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

Unified Diff: gm/strokes.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/strokerects.cpp ('k') | gm/tallstretchedbitmaps.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/strokes.cpp
diff --git a/gm/strokes.cpp b/gm/strokes.cpp
index afbe5ee4da60d5ace2f298258de649f301cf7e9d..218f845c6e74029ce1fde363c8f765297151431b 100644
--- a/gm/strokes.cpp
+++ b/gm/strokes.cpp
@@ -15,8 +15,8 @@
#define H 400
#define N 50
-static const SkScalar SW = SkIntToScalar(W);
-static const SkScalar SH = SkIntToScalar(H);
+constexpr SkScalar SW = SkIntToScalar(W);
+constexpr SkScalar SH = SkIntToScalar(H);
static void rnd_rect(SkRect* r, SkPaint* paint, SkRandom& rand) {
SkScalar x = rand.nextUScalar1() * W;
« no previous file with comments | « gm/strokerects.cpp ('k') | gm/tallstretchedbitmaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698