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

Unified Diff: ui/gfx/geometry/vector2d.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/size_f.h ('k') | ui/gfx/geometry/vector2d_f.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/geometry/vector2d.h
diff --git a/ui/gfx/geometry/vector2d.h b/ui/gfx/geometry/vector2d.h
index 6e315a5816b9bf60ce126395b6728a5f5b8b702e..b456e9303f903c569eece0643e7526b5d55b01b6 100644
--- a/ui/gfx/geometry/vector2d.h
+++ b/ui/gfx/geometry/vector2d.h
@@ -22,13 +22,13 @@ namespace gfx {
class GFX_EXPORT Vector2d {
public:
- Vector2d() : x_(0), y_(0) {}
- Vector2d(int x, int y) : x_(x), y_(y) {}
+ constexpr Vector2d() : x_(0), y_(0) {}
+ constexpr Vector2d(int x, int y) : x_(x), y_(y) {}
- int x() const { return x_; }
+ constexpr int x() const { return x_; }
void set_x(int x) { x_ = x; }
- int y() const { return y_; }
+ constexpr int y() const { return y_; }
void set_y(int y) { y_ = y; }
// True if both components of the vector are 0.
« no previous file with comments | « ui/gfx/geometry/size_f.h ('k') | ui/gfx/geometry/vector2d_f.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698