From 9d55297f1fd1ed0f74277fd95b4c59608220aa77 Mon Sep 17 00:00:00 2001 From: bungeman Date: Sun, 7 Feb 2016 18:42:54 -0800 Subject: Make SkString movable. This adds a move constructor and move assignment to SkString. This allows elision of atomic increments and decrements on the fRec. TBR=reed Already agreed that moving is good. Review URL: https://codereview.chromium.org/1672123002 --- include/core/SkString.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/core/SkString.h b/include/core/SkString.h index 93514f2659..4625dd13cc 100644 --- a/include/core/SkString.h +++ b/include/core/SkString.h @@ -126,6 +126,7 @@ public: explicit SkString(const char text[]); SkString(const char text[], size_t len); SkString(const SkString&); + SkString(SkString&&); ~SkString(); bool isEmpty() const { return 0 == fRec->fLength; } @@ -172,6 +173,7 @@ public: // these methods edit the string SkString& operator=(const SkString&); + SkString& operator=(SkString&&); SkString& operator=(const char text[]); char* writable_str(); -- cgit v1.2.3