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

Unified Diff: gm/megalooper.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/linepaths.cpp ('k') | gm/mixedtextblobs.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/megalooper.cpp
diff --git a/gm/megalooper.cpp b/gm/megalooper.cpp
index 385c60efb10869a4a0567e0c7e5c4e533661a26e..6f071cb72c2094883ba048bbfb0a82bd31bb2dbf 100644
--- a/gm/megalooper.cpp
+++ b/gm/megalooper.cpp
@@ -68,11 +68,11 @@ protected:
}
private:
- static const int kWidth = 800;
- static const int kHeight = 800;
- static const int kHalfOuterClipSize = 100;
- static const int kHalfSquareSize = 50;
- static const int kOffsetToOutsideClip = kHalfSquareSize + kHalfOuterClipSize + 1;
+ static constexpr int kWidth = 800;
+ static constexpr int kHeight = 800;
+ static constexpr int kHalfOuterClipSize = 100;
+ static constexpr int kHalfSquareSize = 50;
+ static constexpr int kOffsetToOutsideClip = kHalfSquareSize + kHalfOuterClipSize + 1;
static const SkPoint gBlurOffsets[4];
static const SkColor gColors[4];
@@ -111,7 +111,7 @@ private:
}
static sk_sp<SkMaskFilter> MakeBlur() {
- static const SkScalar kBlurSigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(25));
+ const SkScalar kBlurSigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(25));
return SkBlurMaskFilter::Make(kNormal_SkBlurStyle, kBlurSigma,
SkBlurMaskFilter::kHighQuality_BlurFlag);
« no previous file with comments | « gm/linepaths.cpp ('k') | gm/mixedtextblobs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698