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

Unified Diff: Source/core/rendering/style/QuotesData.cpp

Issue 232133006: Modified to function QuotesData::equals() function to use operator overloading operator== for easy … (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch Set 5 Created 6 years, 8 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/core/rendering/style/QuotesData.h ('k') | Source/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/QuotesData.cpp
diff --git a/Source/core/rendering/style/QuotesData.cpp b/Source/core/rendering/style/QuotesData.cpp
index a6ef8e9e120745ee3fea36f560774809dcfb00c2..56861760db2fa61a82cafdb31f42c739b4ed2318 100644
--- a/Source/core/rendering/style/QuotesData.cpp
+++ b/Source/core/rendering/style/QuotesData.cpp
@@ -64,13 +64,14 @@ const String QuotesData::getCloseQuote(int index) const
return m_quotePairs.at(index).second;
}
-bool QuotesData::equals(const QuotesData* a, const QuotesData* b)
+bool QuotesData::operator==(const QuotesData* a)
{
- if (a == b)
- return true;
- if (!a || !b)
- return false;
- return a->m_quotePairs == b->m_quotePairs;
+ return m_quotePairs == a->m_quotePairs;
+}
+
+bool QuotesData::operator!=(const QuotesData* a)
+{
+ return m_quotePairs != a->m_quotePairs;
}
} // namespace WebCore
« no previous file with comments | « Source/core/rendering/style/QuotesData.h ('k') | Source/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698