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

Unified Diff: gm/blurquickreject.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/blurcircles2.cpp ('k') | gm/blurrect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/blurquickreject.cpp
diff --git a/gm/blurquickreject.cpp b/gm/blurquickreject.cpp
index c970458a886d44456efeed8fbfa3e9612abbade8..452cdf7e9100d90bb459606cb8e25bf6736a306e 100644
--- a/gm/blurquickreject.cpp
+++ b/gm/blurquickreject.cpp
@@ -31,8 +31,8 @@ protected:
}
void onDraw(SkCanvas* canvas) override {
- static const SkScalar kBlurRadius = SkIntToScalar(20);
- static const SkScalar kBoxSize = SkIntToScalar(100);
+ constexpr SkScalar kBlurRadius = SkIntToScalar(20);
+ constexpr SkScalar kBoxSize = SkIntToScalar(100);
SkRect clipRect = SkRect::MakeXYWH(0, 0, kBoxSize, kBoxSize);
SkRect blurRects[] = {
@@ -73,8 +73,8 @@ protected:
}
private:
- static const int kWidth = 300;
- static const int kHeight = 300;
+ static constexpr int kWidth = 300;
+ static constexpr int kHeight = 300;
typedef GM INHERITED;
};
« no previous file with comments | « gm/blurcircles2.cpp ('k') | gm/blurrect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698