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

Unified Diff: gm/convexpolyeffect.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/convexpolyclip.cpp ('k') | gm/cubicpaths.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/convexpolyeffect.cpp
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index a5c290456658f0294008616d42fafb88eee5a95a..44471e5f135c2ae9aaaf009bae05b7a930037d5a 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -110,7 +110,7 @@ protected:
fPaths.addToTail(tri);
SkPath ngon;
- static const SkScalar kRadius = 50.f;
+ constexpr SkScalar kRadius = 50.f;
const SkPoint center = { kRadius, kRadius };
for (int i = 0; i < GrConvexPolyEffect::kMaxEdges; ++i) {
SkScalar angle = 2 * SK_ScalarPI * i / GrConvexPolyEffect::kMaxEdges;
@@ -160,7 +160,7 @@ protected:
}
SkScalar y = 0;
- static const SkScalar kDX = 12.f;
+ constexpr SkScalar kDX = 12.f;
for (PathList::Iter iter(fPaths, PathList::Iter::kHead_IterStart);
iter.get();
iter.next()) {
« no previous file with comments | « gm/convexpolyclip.cpp ('k') | gm/cubicpaths.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698