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

Unified Diff: gm/patheffects.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/pathcontourstart.cpp ('k') | gm/pathfill.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/patheffects.cpp
diff --git a/gm/patheffects.cpp b/gm/patheffects.cpp
index 9821b3a35d23626f3039235eb912c1930da41257..9a1f62d7c8575d12abead4ea0584e07e9d4bb123 100644
--- a/gm/patheffects.cpp
+++ b/gm/patheffects.cpp
@@ -48,7 +48,7 @@ static void dash_pe(SkPaint* paint) {
compose_pe(paint);
}
-static const int gXY[] = {
+constexpr int gXY[] = {
4, 0, 0, -4, 8, -4, 12, 0, 8, 4, 0, 4
};
@@ -73,7 +73,7 @@ static void one_d_pe(SkPaint* paint) {
}
typedef void (*PE_Proc)(SkPaint*);
-static const PE_Proc gPE[] = { hair_pe, hair2_pe, stroke_pe, dash_pe, one_d_pe };
+constexpr PE_Proc gPE[] = { hair_pe, hair2_pe, stroke_pe, dash_pe, one_d_pe };
static void fill_pe(SkPaint* paint) {
paint->setStyle(SkPaint::kFill_Style);
@@ -98,7 +98,7 @@ static void tile_pe(SkPaint* paint) {
paint->setPathEffect(MakeTileEffect());
}
-static const PE_Proc gPE2[] = { fill_pe, discrete_pe, tile_pe };
+constexpr PE_Proc gPE2[] = { fill_pe, discrete_pe, tile_pe };
class PathEffectGM : public GM {
public:
« no previous file with comments | « gm/pathcontourstart.cpp ('k') | gm/pathfill.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698