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

Side by Side Diff: gm/strokerects.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 unified diff | Download patch
« no previous file with comments | « gm/strokerect.cpp ('k') | gm/strokes.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 9
10 #include "gm.h" 10 #include "gm.h"
11 #include "SkRandom.h" 11 #include "SkRandom.h"
12 12
13 namespace skiagm { 13 namespace skiagm {
14 14
15 #define W 400 15 #define W 400
16 #define H 400 16 #define H 400
17 #define N 100 17 #define N 100
18 18
19 static const SkScalar SW = SkIntToScalar(W); 19 constexpr SkScalar SW = SkIntToScalar(W);
20 static const SkScalar SH = SkIntToScalar(H); 20 constexpr SkScalar SH = SkIntToScalar(H);
21 21
22 class StrokeRectsGM : public GM { 22 class StrokeRectsGM : public GM {
23 public: 23 public:
24 StrokeRectsGM() {} 24 StrokeRectsGM() {}
25 25
26 protected: 26 protected:
27 27
28 SkString onShortName() override { 28 SkString onShortName() override {
29 return SkString("strokerects"); 29 return SkString("strokerects");
30 } 30 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 private: 74 private:
75 typedef GM INHERITED; 75 typedef GM INHERITED;
76 }; 76 };
77 77
78 ////////////////////////////////////////////////////////////////////////////// 78 //////////////////////////////////////////////////////////////////////////////
79 79
80 static GM* MyFactory(void*) { return new StrokeRectsGM; } 80 static GM* MyFactory(void*) { return new StrokeRectsGM; }
81 static GMRegistry reg(MyFactory); 81 static GMRegistry reg(MyFactory);
82 82
83 } 83 }
OLDNEW
« no previous file with comments | « gm/strokerect.cpp ('k') | gm/strokes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698