summaryrefslogtreecommitdiff
path: root/absl/strings/cord.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/strings/cord.cc')
-rw-r--r--absl/strings/cord.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/absl/strings/cord.cc b/absl/strings/cord.cc
index 1c03a618..1aea396f 100644
--- a/absl/strings/cord.cc
+++ b/absl/strings/cord.cc
@@ -491,7 +491,7 @@ static bool RepMemoryUsageLeaf(const CordRep* rep, size_t* total_mem_usage) {
}
void Cord::InlineRep::AssignSlow(const Cord::InlineRep& src) {
- ClearSlow();
+ UnrefTree();
data_ = src.data_;
if (is_tree()) {
@@ -501,11 +501,10 @@ void Cord::InlineRep::AssignSlow(const Cord::InlineRep& src) {
}
}
-void Cord::InlineRep::ClearSlow() {
+void Cord::InlineRep::UnrefTree() {
if (is_tree()) {
CordRep::Unref(tree());
}
- ResetToEmpty();
}
// --------------------------------------------------------------------