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

Unified Diff: gm/anisotropic.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/alphagradients.cpp ('k') | gm/arithmode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/anisotropic.cpp
diff --git a/gm/anisotropic.cpp b/gm/anisotropic.cpp
index 3e573c4d36f63c4f0c9ee9b207352d4d191ac661..d8f9181286f333c0112f9dca81373cb946b3f0bf 100644
--- a/gm/anisotropic.cpp
+++ b/gm/anisotropic.cpp
@@ -27,9 +27,9 @@ protected:
// Create an image consisting of lines radiating from its center
void onOnceBeforeDraw() override {
- static const int kNumLines = 100;
- static const SkScalar kAngleStep = 360.0f / kNumLines;
- static const int kInnerOffset = 10;
+ constexpr int kNumLines = 100;
+ constexpr SkScalar kAngleStep = 360.0f / kNumLines;
+ constexpr int kInnerOffset = 10;
fBM.allocN32Pixels(kImageSize, kImageSize, true);
@@ -97,9 +97,9 @@ protected:
}
private:
- static const int kImageSize = 256;
- static const int kSpacer = 10;
- static const int kNumVertImages = 5;
+ static constexpr int kImageSize = 256;
+ static constexpr int kSpacer = 10;
+ static constexpr int kNumVertImages = 5;
SkBitmap fBM;
SkFilterQuality fFilterQuality;
« no previous file with comments | « gm/alphagradients.cpp ('k') | gm/arithmode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698