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

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

Issue 1966933002: Mojo C++ bindings: switch the existing usage of StructTraits to use the new data view interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@26_reader
Patch Set: typeid() is not allowed :/ Created 4 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
Index: mojo/public/cpp/bindings/lib/array_traits_standard.h
diff --git a/mojo/public/cpp/bindings/lib/array_traits_standard.h b/mojo/public/cpp/bindings/lib/array_traits_standard.h
index a17a3f9095cb3104b3a1ab88930233065ffcd437..09bdbb0a5d5303f1716399a912cf1bf3b602ed08 100644
--- a/mojo/public/cpp/bindings/lib/array_traits_standard.h
+++ b/mojo/public/cpp/bindings/lib/array_traits_standard.h
@@ -15,6 +15,7 @@ struct ArrayTraits<Array<T>> {
using Element = T;
static bool IsNull(const Array<T>& input) { return input.is_null(); }
+ static void SetToNull(Array<T>* output) { *output = nullptr; }
static size_t GetSize(const Array<T>& input) { return input.size(); }
@@ -32,8 +33,6 @@ struct ArrayTraits<Array<T>> {
}
static void Resize(Array<T>& input, size_t size) { input.resize(size); }
-
- static void SetToNull(Array<T>& input) { input = nullptr; }
};
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698