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

Unified Diff: third_party/WebKit/Source/platform/wtf/text/WTFString.cpp

Issue 2909613002: Replaced usage of RefPtr::Release with std::move wraps. (Closed)
Patch Set: Created 3 years, 7 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
Index: third_party/WebKit/Source/platform/wtf/text/WTFString.cpp
diff --git a/third_party/WebKit/Source/platform/wtf/text/WTFString.cpp b/third_party/WebKit/Source/platform/wtf/text/WTFString.cpp
index 2e46b79979f9980fb5203badc1c0a10363cd1f29..052b80217f0dc5ecc40d8bce40fe219178402b4f 100644
--- a/third_party/WebKit/Source/platform/wtf/text/WTFString.cpp
+++ b/third_party/WebKit/Source/platform/wtf/text/WTFString.cpp
@@ -110,7 +110,7 @@ void String::append(const StringView& string) {
memcpy(data, impl_->Characters8(), impl_->length() * sizeof(LChar));
memcpy(data + impl_->length(), string.Characters8(),
string.length() * sizeof(LChar));
- impl_ = new_impl.Release();
+ impl_ = std::move(new_impl);
return;
}
@@ -132,7 +132,7 @@ void String::append(const StringView& string) {
StringImpl::CopyChars(data + impl_->length(), string.Characters16(),
string.length());
- impl_ = new_impl.Release();
+ impl_ = std::move(new_impl);
}
template <typename CharacterType>
@@ -156,7 +156,7 @@ inline void String::AppendInternal(CharacterType c) {
else
StringImpl::CopyChars(data, impl_->Characters16(), impl_->length());
data[impl_->length()] = c;
- impl_ = new_impl.Release();
+ impl_ = std::move(new_impl);
}
void String::append(LChar c) {
@@ -230,10 +230,10 @@ void String::insert(const StringView& string, unsigned position) {
DCHECK(impl_);
if (string.Is8Bit())
- impl_ = InsertInternal(impl_.Release(), string.Characters8(),
+ impl_ = InsertInternal(std::move(impl_), string.Characters8(),
string.length(), position);
else
- impl_ = InsertInternal(impl_.Release(), string.Characters16(),
+ impl_ = InsertInternal(std::move(impl_), string.Characters16(),
string.length(), position);
}

Powered by Google App Engine
This is Rietveld 408576698