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

Unified Diff: gm/bmpfilterqualityrepeat.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/blurs.cpp ('k') | gm/circulararcs.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bmpfilterqualityrepeat.cpp
diff --git a/gm/bmpfilterqualityrepeat.cpp b/gm/bmpfilterqualityrepeat.cpp
index 6264d74df284eb02d1fbdad5e6f0b8bf712c8c6b..c55626f6b2eb1e16ce6e7ea4b9656c4f81cd1ad4 100644
--- a/gm/bmpfilterqualityrepeat.cpp
+++ b/gm/bmpfilterqualityrepeat.cpp
@@ -39,7 +39,7 @@ protected:
void onDraw(SkCanvas* canvas) override {
- static const struct {
+ constexpr struct {
SkFilterQuality fQuality;
const char* fName;
} kQualities[] = {
@@ -59,7 +59,7 @@ protected:
lm.setTranslateX(423);
lm.setTranslateY(330);
- static const SkShader::TileMode kTM = SkShader::kRepeat_TileMode;
+ constexpr SkShader::TileMode kTM = SkShader::kRepeat_TileMode;
bmpPaint.setShader(SkShader::MakeBitmapShader(fBmp, kTM, kTM, &lm));
SkRect rect = SkRect::MakeLTRB(20, 60, 220, 210);
canvas->drawRect(rect, bmpPaint);
« no previous file with comments | « gm/blurs.cpp ('k') | gm/circulararcs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698