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

Unified Diff: gm/variedtext.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/typeface.cpp ('k') | gm/vertices.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/variedtext.cpp
diff --git a/gm/variedtext.cpp b/gm/variedtext.cpp
index e33c40b7430bb4c715eb3e0b9b057c1f47b44c30..b17bb7012a3e0cbea3c09f89eb91efc606ceb62e 100644
--- a/gm/variedtext.cpp
+++ b/gm/variedtext.cpp
@@ -72,8 +72,8 @@ protected:
fColors[i] |= 0xFF000000;
fColors[i] = sk_tool_utils::color_to_565(fColors[i]);
- static const SkScalar kMinPtSize = 8.f;
- static const SkScalar kMaxPtSize = 32.f;
+ constexpr SkScalar kMinPtSize = 8.f;
+ constexpr SkScalar kMaxPtSize = 32.f;
fPtSizes[i] = random.nextRangeScalar(kMinPtSize, kMaxPtSize);
@@ -134,9 +134,9 @@ protected:
bool runAsBench() const override { return true; }
private:
- static const int kCnt = 30;
- static const int kMinLength = 15;
- static const int kMaxLength = 40;
+ static constexpr int kCnt = 30;
+ static constexpr int kMinLength = 15;
+ static constexpr int kMaxLength = 40;
bool fEffectiveClip;
bool fLCD;
« no previous file with comments | « gm/typeface.cpp ('k') | gm/vertices.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698