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

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

Issue 2891283002: data-equivalent (Closed)
Patch Set: Created 3 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 | « third_party/WebKit/Source/core/animation/css/CSSTransitionData.h ('k') | 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/DataEquivalency.h
diff --git a/third_party/WebKit/Source/core/style/DataEquivalency.h b/third_party/WebKit/Source/core/style/DataEquivalency.h
index 495119165744fd712a2a83ba9b1d11d212dca501..198f55edeb2b2b80f3e91854a93304ed443bc2dd 100644
--- a/third_party/WebKit/Source/core/style/DataEquivalency.h
+++ b/third_party/WebKit/Source/core/style/DataEquivalency.h
@@ -16,12 +16,17 @@ template <typename T>
class Member;
template <typename T>
+bool DataEquivalent(const T& a, const T& b) {
+ return a == b;
+}
+
+template <typename T>
bool DataEquivalent(const T* a, const T* b) {
if (a == b)
return true;
if (!a || !b)
return false;
- return *a == *b;
+ return DataEquivalent(*a, *b);
}
template <typename T>
« no previous file with comments | « third_party/WebKit/Source/core/animation/css/CSSTransitionData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698