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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2438353002: Avoid copying value in ComputedStyle CoW comparions (compareEqual) (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 6152fa9e3b9a2a33df438d9be6b6be6d076513e4..6dcc03aa5cad8335594833d6a05322ee746b9547 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -82,6 +82,11 @@ inline bool compareEqual(const T& t, const U& u) {
return t == static_cast<T>(u);
}
+template <typename T>
+inline bool compareEqual(const T& a, const T& b) {
+ return a == b;
+}
+
#define SET_VAR(group, variable, value) \
if (!compareEqual(group->variable, value)) \
group.access()->variable = value
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698