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

Unified Diff: gm/verttext.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/vertices.cpp ('k') | gm/xfermodeimagefilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/verttext.cpp
diff --git a/gm/verttext.cpp b/gm/verttext.cpp
index 37cf37cbad83a95646708755652c8f2bc2e46354..700fb25e410692f615cada7f1ae10710f07cfe64 100644
--- a/gm/verttext.cpp
+++ b/gm/verttext.cpp
@@ -13,17 +13,17 @@
namespace skiagm {
#define TEXT_SIZE 48
-static const char gText[] = "Hello";
+constexpr char gText[] = "Hello";
//Before shaping
-//static const char gText[] = "「テスト。」";
-//static const char gText[] = {0xE3,0x80,0x8C, 0xE3,0x83,0x86, 0xE3,0x82,0xB9, 0xE3,0x83,0x88, 0xE3,0x80,0x82, 0xE3,0x80,0x8D, 0x0};
+//constexpr char gText[] = "「テスト。」";
+//constexpr char gText[] = {0xE3,0x80,0x8C, 0xE3,0x83,0x86, 0xE3,0x82,0xB9, 0xE3,0x83,0x88, 0xE3,0x80,0x82, 0xE3,0x80,0x8D, 0x0};
//After shaping
-//static const char gText[] = "﹁テスト︒﹂";
-//static const char gText[] = {0xEF,0xB9,0x81, 0xE3,0x83,0x86, 0xE3,0x82,0xB9, 0xE3,0x83,0x88, 0xEF,0xB8,0x92, 0xEF,0xB9,0x82, 0x0};
+//constexpr char gText[] = "﹁テスト︒﹂";
+//constexpr char gText[] = {0xEF,0xB9,0x81, 0xE3,0x83,0x86, 0xE3,0x82,0xB9, 0xE3,0x83,0x88, 0xEF,0xB8,0x92, 0xEF,0xB9,0x82, 0x0};
-static const size_t gLen = sizeof(gText) - sizeof(gText[0]);
+constexpr size_t gLen = sizeof(gText) - sizeof(gText[0]);
class VertTextGM : public GM {
public:
« no previous file with comments | « gm/vertices.cpp ('k') | gm/xfermodeimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698