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

Unified Diff: mojo/public/cpp/bindings/lib/wtf_clone_equals_util.h

Issue 2837353002: mojo: Make EqualsTraits<> part of public C++ API (Closed)
Patch Set: fix build Created 3 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
Index: mojo/public/cpp/bindings/lib/wtf_clone_equals_util.h
diff --git a/mojo/public/cpp/bindings/lib/wtf_clone_equals_util.h b/mojo/public/cpp/bindings/lib/wtf_clone_equals_util.h
index 07f969dd84e5fd4e90f409ce383ae68ca5b37124..f18274ff06f17b7bd22fc008b611c715a4a7a4bf 100644
--- a/mojo/public/cpp/bindings/lib/wtf_clone_equals_util.h
+++ b/mojo/public/cpp/bindings/lib/wtf_clone_equals_util.h
@@ -8,7 +8,7 @@
#include <type_traits>
#include "mojo/public/cpp/bindings/clone_traits.h"
-#include "mojo/public/cpp/bindings/lib/equals_traits.h"
+#include "mojo/public/cpp/bindings/equals_traits.h"
#include "third_party/WebKit/Source/platform/wtf/HashMap.h"
#include "third_party/WebKit/Source/platform/wtf/Optional.h"
#include "third_party/WebKit/Source/platform/wtf/Vector.h"
@@ -39,15 +39,13 @@ struct CloneTraits<WTF::HashMap<K, V>, false> {
}
};
-namespace internal {
-
template <typename T>
struct EqualsTraits<WTF::Vector<T>, false> {
static bool Equals(const WTF::Vector<T>& a, const WTF::Vector<T>& b) {
if (a.size() != b.size())
return false;
for (size_t i = 0; i < a.size(); ++i) {
- if (!internal::Equals(a[i], b[i]))
+ if (!Equals(a[i], b[i]))
return false;
}
return true;
@@ -65,14 +63,13 @@ struct EqualsTraits<WTF::HashMap<K, V>, false> {
for (auto iter = a.begin(); iter != a_end; ++iter) {
auto b_iter = b.find(iter->key);
- if (b_iter == b_end || !internal::Equals(iter->value, b_iter->value))
+ if (b_iter == b_end || !Equals(iter->value, b_iter->value))
return false;
}
return true;
}
};
-} // namespace internal
} // namespace mojo
#endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_WTF_CLONE_EQUALS_UTIL_H_
« no previous file with comments | « mojo/public/cpp/bindings/lib/equals_traits.h ('k') | mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698