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

Unified Diff: ui/gfx/geometry/vector2d_f.h

Issue 2051343002: Make various gfx classes more amenable to use as compile-time constants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete destructor Created 4 years, 6 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 | « ui/gfx/geometry/vector2d.h ('k') | ui/gfx/geometry/vector3d_f.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/geometry/vector2d_f.h
diff --git a/ui/gfx/geometry/vector2d_f.h b/ui/gfx/geometry/vector2d_f.h
index 593e7b82bdf81d6999868f7c08804a648e064ce4..3e1152a56471832510c3b8af64509a7b09a1d923 100644
--- a/ui/gfx/geometry/vector2d_f.h
+++ b/ui/gfx/geometry/vector2d_f.h
@@ -19,13 +19,13 @@ namespace gfx {
class GFX_EXPORT Vector2dF {
public:
- Vector2dF() : x_(0), y_(0) {}
- Vector2dF(float x, float y) : x_(x), y_(y) {}
+ constexpr Vector2dF() : x_(0), y_(0) {}
+ constexpr Vector2dF(float x, float y) : x_(x), y_(y) {}
- float x() const { return x_; }
+ constexpr float x() const { return x_; }
void set_x(float x) { x_ = x; }
- float y() const { return y_; }
+ constexpr float y() const { return y_; }
void set_y(float y) { y_ = y; }
// True if both components of the vector are 0.
« no previous file with comments | « ui/gfx/geometry/vector2d.h ('k') | ui/gfx/geometry/vector3d_f.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698