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

Unified Diff: Source/platform/LengthSize.h

Issue 305883002: Switch arguments to const Length references for performance (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | « Source/platform/LengthPoint.h ('k') | Source/platform/graphics/filters/FilterOperation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/LengthSize.h
diff --git a/Source/platform/LengthSize.h b/Source/platform/LengthSize.h
index 6542adb743aea8092200fa9067cbf05f934f7bab..a506dc7de83a9ef6fafb31a642a341ba5a8113aa 100644
--- a/Source/platform/LengthSize.h
+++ b/Source/platform/LengthSize.h
@@ -31,7 +31,7 @@ public:
{
}
- LengthSize(Length width, Length height)
+ LengthSize(const Length& width, const Length& height)
: m_width(width)
, m_height(height)
{
@@ -42,11 +42,11 @@ public:
return m_width == o.m_width && m_height == o.m_height;
}
- void setWidth(Length width) { m_width = width; }
- Length width() const { return m_width; }
+ void setWidth(const Length& width) { m_width = width; }
+ const Length& width() const { return m_width; }
- void setHeight(Length height) { m_height = height; }
- Length height() const { return m_height; }
+ void setHeight(const Length& height) { m_height = height; }
+ const Length& height() const { return m_height; }
private:
Length m_width;
« no previous file with comments | « Source/platform/LengthPoint.h ('k') | Source/platform/graphics/filters/FilterOperation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698