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

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

Issue 2174843003: cc mojo: Use ArrayDataViews in RenderPasses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A little bit of cleanup Created 4 years, 5 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_serialization.h
diff --git a/mojo/public/cpp/bindings/lib/array_serialization.h b/mojo/public/cpp/bindings/lib/array_serialization.h
index 5db27a5502a5a238ec1a6765d8f2854248a36e36..a5a6c52344d178665589b78de751f39b0c1cd1bc 100644
--- a/mojo/public/cpp/bindings/lib/array_serialization.h
+++ b/mojo/public/cpp/bindings/lib/array_serialization.h
@@ -34,6 +34,7 @@ class ArrayIterator {};
template <typename Traits, typename MaybeConstUserType>
class ArrayIterator<Traits, MaybeConstUserType, true> {
public:
+ using UserType = typename std::remove_const<MaybeConstUserType>::type;
using IteratorType = decltype(
CallGetBeginIfExists<Traits>(std::declval<MaybeConstUserType&>()));
@@ -44,10 +45,11 @@ class ArrayIterator<Traits, MaybeConstUserType, true> {
size_t GetSize() const { return Traits::GetSize(input_); }
using GetNextResult =
- decltype(Traits::GetValue(std::declval<IteratorType&>()));
+ decltype(Traits::GetValue(std::declval<MaybeConstUserType&>(),
+ std::declval<IteratorType&>()));
GetNextResult GetNext() {
- auto& value = Traits::GetValue(iter_);
- Traits::AdvanceIterator(iter_);
+ auto& value = Traits::GetValue(input_, iter_);
+ Traits::AdvanceIterator(input_, iter_);
return value;
}

Powered by Google App Engine
This is Rietveld 408576698