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

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

Issue 2174843003: cc mojo: Use ArrayDataViews in RenderPasses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix RenderPassId 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
« no previous file with comments | « mojo/public/cpp/bindings/lib/array_serialization.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/map_serialization.h
diff --git a/mojo/public/cpp/bindings/lib/map_serialization.h b/mojo/public/cpp/bindings/lib/map_serialization.h
index c28b835da6f7cf72e3b57e8dfc8925597e392ab1..88276e1b3c4b1e5da1749f2e26b46537cf7f253c 100644
--- a/mojo/public/cpp/bindings/lib/map_serialization.h
+++ b/mojo/public/cpp/bindings/lib/map_serialization.h
@@ -46,12 +46,15 @@ class MapKeyReader : public MapReaderBase<MaybeConstUserType> {
public:
using Base = MapReaderBase<MaybeConstUserType>;
using Traits = typename Base::Traits;
+ using MaybeConstIterator = typename Base::MaybeConstIterator;
explicit MapKeyReader(MaybeConstUserType& input) : Base(input) {}
~MapKeyReader() {}
- const typename Traits::Key& GetNext() {
- const typename Traits::Key& key = Traits::GetKey(this->iter_);
+ using GetNextResult =
+ decltype(Traits::GetKey(std::declval<MaybeConstIterator&>()));
+ GetNextResult GetNext() {
+ GetNextResult key = Traits::GetKey(this->iter_);
Traits::AdvanceIterator(this->iter_);
return key;
}
« no previous file with comments | « mojo/public/cpp/bindings/lib/array_serialization.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698