aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kasting <pkasting@chromium.org>2021-07-29 19:57:42 +0000
committerCopybara-Service <copybara-worker@google.com>2021-07-29 13:05:04 -0700
commitcc55358d0d888c102638c2937e73f6a2e52518ca (patch)
tree76b2cae391a0dd2dd3d25e9c4a0635f15f056a5c
parenta91bdd5038a594a877593bc121bd369f24f1e0db (diff)
downloadzucchini-cc55358d0d888c102638c2937e73f6a2e52518ca.tar.gz
Fix some instances of -Wdeprecated-copy: components/
Bug: 1213098 Change-Id: Ib769095b1d2cd110f8d458bc95a62afecc070cce Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3056862 Auto-Submit: Peter Kasting <pkasting@chromium.org> Commit-Queue: Cait Phillips <caitkp@chromium.org> Reviewed-by: Cait Phillips <caitkp@chromium.org> Cr-Commit-Position: refs/heads/master@{#906817} NOKEYCHECK=True GitOrigin-RevId: f1dcb7053e7f86ce4821f71fc9da98ce59d37035
-rw-r--r--encoded_view.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/encoded_view.h b/encoded_view.h
index 852c4a8..bd88099 100644
--- a/encoded_view.h
+++ b/encoded_view.h
@@ -53,6 +53,10 @@ class EncodedView {
Iterator(const EncodedView* encoded_view, difference_type pos)
: encoded_view_(encoded_view), pos_(pos) {}
+ Iterator(const Iterator&) = default;
+
+ Iterator& operator=(const Iterator&) = default;
+
value_type operator*() const {
return encoded_view_->Projection(static_cast<offset_t>(pos_));
}
@@ -93,12 +97,6 @@ class EncodedView {
return *this;
}
- Iterator& operator=(const Iterator& it) {
- encoded_view_ = it.encoded_view_;
- pos_ = it.pos_;
- return *this;
- }
-
friend bool operator==(Iterator a, Iterator b) { return a.pos_ == b.pos_; }
friend bool operator!=(Iterator a, Iterator b) { return !(a == b); }