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

Unified Diff: gm/nonclosedpaths.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/nested.cpp ('k') | gm/occludedrrectblur.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/nonclosedpaths.cpp
diff --git a/gm/nonclosedpaths.cpp b/gm/nonclosedpaths.cpp
index a3d91b50a3a2211ec9a837f844777a1b5d9b8369..dc806f30b62d25cd2888c33d5cd26a5bd44fe9d5 100644
--- a/gm/nonclosedpaths.cpp
+++ b/gm/nonclosedpaths.cpp
@@ -71,22 +71,22 @@ protected:
// Stroke widths are:
// 0(may use hairline rendering), 10(common case for stroke-style)
// 40 and 50(>= geometry width/height, make the contour filled in fact)
- static const int kStrokeWidth[] = {0, 10, 40, 50};
+ constexpr int kStrokeWidth[] = {0, 10, 40, 50};
int numWidths = SK_ARRAY_COUNT(kStrokeWidth);
- static const SkPaint::Style kStyle[] = {
+ constexpr SkPaint::Style kStyle[] = {
SkPaint::kStroke_Style, SkPaint::kStrokeAndFill_Style
};
- static const SkPaint::Cap kCap[] = {
+ constexpr SkPaint::Cap kCap[] = {
SkPaint::kButt_Cap, SkPaint::kRound_Cap, SkPaint::kSquare_Cap
};
- static const SkPaint::Join kJoin[] = {
+ constexpr SkPaint::Join kJoin[] = {
SkPaint::kMiter_Join, SkPaint::kRound_Join, SkPaint::kBevel_Join
};
- static const ClosureType kType[] = {
+ constexpr ClosureType kType[] = {
TotallyNonClosed, FakeCloseCorner, FakeCloseMiddle
};
« no previous file with comments | « gm/nested.cpp ('k') | gm/occludedrrectblur.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698