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

Unified Diff: gm/pathfill.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/patheffects.cpp ('k') | gm/perspshaders.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/pathfill.cpp
diff --git a/gm/pathfill.cpp b/gm/pathfill.cpp
index b4010ce6061df9b916f943d25ce176ff746eca26..3496cfd04dccf7ea589d245c08b4ea22d56cb179 100644
--- a/gm/pathfill.cpp
+++ b/gm/pathfill.cpp
@@ -23,7 +23,7 @@ static SkScalar make_frame(SkPath* path) {
}
static SkScalar make_triangle(SkPath* path) {
- static const int gCoord[] = {
+ constexpr int gCoord[] = {
10, 20, 15, 5, 30, 30
};
path->moveTo(SkIntToScalar(gCoord[0]), SkIntToScalar(gCoord[1]));
@@ -102,7 +102,7 @@ static SkScalar make_line(SkPath* path) {
return SkIntToScalar(40);
}
-static const MakePathProc gProcs[] = {
+constexpr MakePathProc gProcs[] = {
make_frame,
make_triangle,
make_rect,
« no previous file with comments | « gm/patheffects.cpp ('k') | gm/perspshaders.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698