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

Unified Diff: gm/hairlines.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/gradients_no_texture.cpp ('k') | gm/hairmodes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/hairlines.cpp
diff --git a/gm/hairlines.cpp b/gm/hairlines.cpp
index 89c5cd3d4fbe4f6596e30c9f8c9a62d9007a0a64..6ec5bdeb7752b8eb5454a98a36382b70ca7d86cc 100644
--- a/gm/hairlines.cpp
+++ b/gm/hairlines.cpp
@@ -138,9 +138,9 @@ protected:
{
// Arc example to test imperfect truncation bug (crbug.com/295626)
- static const SkScalar kRad = SkIntToScalar(2000);
- static const SkScalar kStartAngle = 262.59717f;
- static const SkScalar kSweepAngle = SkScalarHalf(17.188717f);
+ constexpr SkScalar kRad = SkIntToScalar(2000);
+ constexpr SkScalar kStartAngle = 262.59717f;
+ constexpr SkScalar kSweepAngle = SkScalarHalf(17.188717f);
SkPath* bug = &fPaths.push_back();
@@ -163,8 +163,8 @@ protected:
}
void onDraw(SkCanvas* canvas) override {
- static const SkAlpha kAlphaValue[] = { 0xFF, 0x40 };
- static const SkScalar kWidths[] = { 0, 0.5f, 1.5f };
+ constexpr SkAlpha kAlphaValue[] = { 0xFF, 0x40 };
+ constexpr SkScalar kWidths[] = { 0, 0.5f, 1.5f };
enum {
kMargin = 5,
« no previous file with comments | « gm/gradients_no_texture.cpp ('k') | gm/hairmodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698