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

Unified Diff: gm/lighting.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/lcdoverlap.cpp ('k') | gm/lightingshader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/lighting.cpp
diff --git a/gm/lighting.cpp b/gm/lighting.cpp
index 7915c331d0d03edf4da18876a35093d97bb113f6..cd4132e1b560b96c7dcdeeb2ee8aaefb0fa7ed84 100644
--- a/gm/lighting.cpp
+++ b/gm/lighting.cpp
@@ -158,14 +158,14 @@ protected:
}
bool onAnimate(const SkAnimTimer& timer) override {
- static const SkScalar kDesiredDurationSecs = 15.0f;
+ constexpr SkScalar kDesiredDurationSecs = 15.0f;
fAzimuth = kStartAzimuth + timer.scaled(360.0f/kDesiredDurationSecs, 360.0f);
return true;
}
private:
- static const int kStartAzimuth = 225;
+ static constexpr int kStartAzimuth = 225;
SkBitmap fBitmap;
SkScalar fAzimuth;
« no previous file with comments | « gm/lcdoverlap.cpp ('k') | gm/lightingshader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698