Title: [166589] trunk/Source/WebCore
- Revision
- 166589
- Author
- zandober...@gmail.com
- Date
- 2014-04-01 08:35:46 -0700 (Tue, 01 Apr 2014)
Log Message
Prevent unnecessary copies in compareEqual template
https://bugs.webkit.org/show_bug.cgi?id=131014
Reviewed by Antti Koivisto.
* rendering/style/RenderStyle.h:
(compareEqual): Casting the second parameter to a non-const, non-reference type
causes an extra copy of that object. Casting to the const reference type of the
first parameter avoids that.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (166588 => 166589)
--- trunk/Source/WebCore/ChangeLog 2014-04-01 15:29:16 UTC (rev 166588)
+++ trunk/Source/WebCore/ChangeLog 2014-04-01 15:35:46 UTC (rev 166589)
@@ -1,5 +1,17 @@
2014-04-01 Zan Dobersek <zdober...@igalia.com>
+ Prevent unnecessary copies in compareEqual template
+ https://bugs.webkit.org/show_bug.cgi?id=131014
+
+ Reviewed by Antti Koivisto.
+
+ * rendering/style/RenderStyle.h:
+ (compareEqual): Casting the second parameter to a non-const, non-reference type
+ causes an extra copy of that object. Casting to the const reference type of the
+ first parameter avoids that.
+
+2014-04-01 Zan Dobersek <zdober...@igalia.com>
+
Avoid unnecessary HashSet copies when calling collectInstancesForSVGElement
https://bugs.webkit.org/show_bug.cgi?id=131020
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (166588 => 166589)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2014-04-01 15:29:16 UTC (rev 166588)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2014-04-01 15:35:46 UTC (rev 166589)
@@ -91,7 +91,7 @@
#include "TextSizeAdjustment.h"
#endif
-template<typename T, typename U> inline bool compareEqual(const T& t, const U& u) { return t == static_cast<T>(u); }
+template<typename T, typename U> inline bool compareEqual(const T& t, const U& u) { return t == static_cast<const T&>(u); }
#define SET_VAR(group, variable, value) \
if (!compareEqual(group->variable, value)) \
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes