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

Unified Diff: gm/colorcube.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/clippedbitmapshaders.cpp ('k') | gm/coloremoji.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/colorcube.cpp
diff --git a/gm/colorcube.cpp b/gm/colorcube.cpp
index 54e0688c6ab279f0d55fc856e0bc5de25804bb91..dc183bc3ae9d01531a85bc69e5906fe647ab3311 100644
--- a/gm/colorcube.cpp
+++ b/gm/colorcube.cpp
@@ -14,11 +14,11 @@
namespace skiagm {
static sk_sp<SkShader> MakeLinear() {
- static const SkPoint pts[2] = {
+ constexpr SkPoint pts[2] = {
{ 0, 0 },
{ SkIntToScalar(80), SkIntToScalar(80) }
};
- static const SkColor colors[] = { SK_ColorYELLOW, SK_ColorBLUE };
+ constexpr SkColor colors[] = { SK_ColorYELLOW, SK_ColorBLUE };
return SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kRepeat_TileMode, 0,
&SkMatrix::I());
}
« no previous file with comments | « gm/clippedbitmapshaders.cpp ('k') | gm/coloremoji.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698