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

Unified Diff: Source/platform/geometry/LayoutRect.h

Issue 952273006: Make the constructor of a LayoutRect from an IntRect explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
Index: Source/platform/geometry/LayoutRect.h
diff --git a/Source/platform/geometry/LayoutRect.h b/Source/platform/geometry/LayoutRect.h
index 7af11a365ff5a928fcad80aeca663dbc611c2c87..d69671fb2b656c12d89a5d19adf6d7d6ceb176ea 100644
--- a/Source/platform/geometry/LayoutRect.h
+++ b/Source/platform/geometry/LayoutRect.h
@@ -49,7 +49,7 @@ public:
: m_location(LayoutPoint(x, y)), m_size(LayoutSize(width, height)) { }
LayoutRect(const FloatPoint& location, const FloatSize& size)
: m_location(location), m_size(size) { }
- LayoutRect(const IntRect& rect) : m_location(rect.location()), m_size(rect.size()) { }
+ explicit LayoutRect(const IntRect& rect) : m_location(rect.location()), m_size(rect.size()) { }
chrishtr 2015/02/26 18:26:47 Explicit.
explicit LayoutRect(const FloatRect&); // don't do this implicitly since it's lossy

Powered by Google App Engine
This is Rietveld 408576698