Bug 1416306 - Make the function argument a const& instead of passing by value. r=mstange
authorMilan Sreckovic <milan@mozilla.com>
Fri, 10 Nov 2017 10:29:00 -0500
changeset 696776 20d4af5881a14ca34bec7fb869b7f161419bc856
parent 696775 8e62f2933a3995e2503bf15346f3af3a3e50f914
child 696777 dcb005c6e64be8d53898a4a98f3610691ed676ca
push id88784
push usercholler@mozilla.com
push dateSat, 11 Nov 2017 10:21:53 +0000
reviewersmstange
bugs1416306
milestone58.0a1
Bug 1416306 - Make the function argument a const& instead of passing by value. r=mstange
gfx/webrender_bindings/WebRenderTypes.h
--- a/gfx/webrender_bindings/WebRenderTypes.h
+++ b/gfx/webrender_bindings/WebRenderTypes.h
@@ -300,17 +300,17 @@ static inline wr::LayoutRect ToLayoutRec
   wr::LayoutRect r;
   r.origin.x = rect.x;
   r.origin.y = rect.y;
   r.size.width = rect.Width();
   r.size.height = rect.Height();
   return r;
 }
 
-static inline wr::LayoutRect ToLayoutRect(const gfxRect rect)
+static inline wr::LayoutRect ToLayoutRect(const gfxRect& rect)
 {
   wr::LayoutRect r;
   r.origin.x = rect.x;
   r.origin.y = rect.y;
   r.size.width = rect.Width();
   r.size.height = rect.Height();
   return r;
 }