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

Unified Diff: gm/dstreadshuffle.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/drawminibitmaprect.cpp ('k') | gm/emptypath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/dstreadshuffle.cpp
diff --git a/gm/dstreadshuffle.cpp b/gm/dstreadshuffle.cpp
index 4f0f071b0a8e6d59d6f16e5c7ce1cd24dd664f19..47c70563b5388f23956f53258e8689d29f791b0e 100644
--- a/gm/dstreadshuffle.cpp
+++ b/gm/dstreadshuffle.cpp
@@ -44,8 +44,8 @@ protected:
void drawShape(SkCanvas* canvas,
SkPaint* paint,
ShapeType type) {
- static const SkRect kRect = SkRect::MakeXYWH(SkIntToScalar(-50), SkIntToScalar(-50),
- SkIntToScalar(75), SkIntToScalar(105));
+ const SkRect kRect = SkRect::MakeXYWH(SkIntToScalar(-50), SkIntToScalar(-50),
+ SkIntToScalar(75), SkIntToScalar(105));
switch (type) {
case kCircle_ShapeType:
canvas->drawCircle(0, 0, 50, *paint);
@@ -183,8 +183,8 @@ private:
SkAutoTUnref<SkShader> fBG;
SkPath fConcavePath;
SkPath fConvexPath;
- static const int kWidth = 900;
- static const int kHeight = 400;
+ static constexpr int kWidth = 900;
+ static constexpr int kHeight = 400;
typedef GM INHERITED;
};
« no previous file with comments | « gm/drawminibitmaprect.cpp ('k') | gm/emptypath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698