From 649687497fc9daa8c7e7aaa5e5efe29ad01f1286 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Tue, 19 Apr 2022 23:15:14 +0000 Subject: [PATCH] Convert SerialStorage::Iterator over to being explicit. This CL adds the attribute and fixes up the call sites to work with the constructors being explicit. Bug: dawn:1339 Change-Id: Ic584477c064411e42143dfc6179bbddb0d6a69c4 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86871 Reviewed-by: Ben Clayton Reviewed-by: Corentin Wallez Commit-Queue: Dan Sinclair --- src/dawn/common/SerialStorage.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dawn/common/SerialStorage.h b/src/dawn/common/SerialStorage.h index 5194a21d35..2eae0adee6 100644 --- a/src/dawn/common/SerialStorage.h +++ b/src/dawn/common/SerialStorage.h @@ -35,7 +35,7 @@ class SerialStorage { public: class Iterator { public: - Iterator(StorageIterator start); + explicit Iterator(StorageIterator start); Iterator& operator++(); bool operator==(const Iterator& other) const; @@ -52,7 +52,7 @@ class SerialStorage { class ConstIterator { public: - ConstIterator(ConstStorageIterator start); + explicit ConstIterator(ConstStorageIterator start); ConstIterator& operator++(); bool operator==(const ConstIterator& other) const; @@ -198,12 +198,12 @@ SerialStorage::BeginEnd::BeginEnd(typename SerialStorage::Stor template typename SerialStorage::Iterator SerialStorage::BeginEnd::begin() const { - return {mStartIt}; + return SerialStorage::Iterator(mStartIt); } template typename SerialStorage::Iterator SerialStorage::BeginEnd::end() const { - return {mEndIt}; + return SerialStorage::Iterator(mEndIt); } // SerialStorage::Iterator