aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2017-03-12 10:40:13 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-12 15:15:14 +0000
commitd54639f768edad4989256bad5148cdd7b2bf2ecc (patch)
tree1192c5609b21c684a546ab22d7b142ee6b723c23 /include/private
parent9a4148f2eb51e729272e922795d363e5691ff16e (diff)
Add SkSTArray move assignment operators
Change-Id: Ib655a8a4d62c27dee4f92fcb644237f6fbbdb75b Reviewed-on: https://skia-review.googlesource.com/9510 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'include/private')
-rw-r--r--include/private/SkTArray.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/private/SkTArray.h b/include/private/SkTArray.h
index 22f6d44cea..b90b41d7c5 100644
--- a/include/private/SkTArray.h
+++ b/include/private/SkTArray.h
@@ -569,7 +569,13 @@ public:
}
SkSTArray& operator= (const SkSTArray& array) {
- return *this = *(const INHERITED*)&array;
+ INHERITED::operator=(array);
+ return *this;
+ }
+
+ SkSTArray& operator= (SkSTArray&& array) {
+ INHERITED::operator=(std::move(array));
+ return *this;
}
SkSTArray& operator= (const INHERITED& array) {
@@ -577,6 +583,11 @@ public:
return *this;
}
+ SkSTArray& operator= (INHERITED&& array) {
+ INHERITED::operator=(std::move(array));
+ return *this;
+ }
+
private:
SkAlignedSTStorage<N,T> fStorage;
};