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

Unified Diff: gm/xfermodes3.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/xfermodes2.cpp ('k') | gm/yuvtorgbeffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/xfermodes3.cpp
diff --git a/gm/xfermodes3.cpp b/gm/xfermodes3.cpp
index 642175e5a18b1b4c86da65f4aaa9a4f68e375ad9..300b78f2a28544bab9c3d3a861d8cedc7ef3c6f6 100644
--- a/gm/xfermodes3.cpp
+++ b/gm/xfermodes3.cpp
@@ -48,13 +48,13 @@ protected:
labelP.setAntiAlias(true);
sk_tool_utils::set_portable_typeface(&labelP);
- static const SkColor kSolidColors[] = {
+ constexpr SkColor kSolidColors[] = {
SK_ColorTRANSPARENT,
SK_ColorBLUE,
0x80808000
};
- static const SkColor kBmpAlphas[] = {
+ constexpr SkColor kBmpAlphas[] = {
0xff,
0x80,
};
@@ -63,7 +63,7 @@ protected:
int test = 0;
int x = 0, y = 0;
- static const struct { SkPaint::Style fStyle; SkScalar fWidth; } kStrokes[] = {
+ constexpr struct { SkPaint::Style fStyle; SkScalar fWidth; } kStrokes[] = {
{SkPaint::kFill_Style, 0},
{SkPaint::kStroke_Style, SkIntToScalar(kSize) / 2},
};
@@ -173,7 +173,7 @@ private:
}
void onOnceBeforeDraw() override {
- static const uint32_t kCheckData[] = {
+ const uint32_t kCheckData[] = {
SkPackARGB32(0xFF, 0x42, 0x41, 0x42),
SkPackARGB32(0xFF, 0xD6, 0xD3, 0xD6),
SkPackARGB32(0xFF, 0xD6, 0xD3, 0xD6),
« no previous file with comments | « gm/xfermodes2.cpp ('k') | gm/yuvtorgbeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698