about summary refs log tree commit diff
path: root/absl
diff options
context:
space:
mode:
Diffstat (limited to 'absl')
-rw-r--r--absl/container/inlined_vector.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/absl/container/inlined_vector.h b/absl/container/inlined_vector.h
index e7c43ff3c815..0f100360b757 100644
--- a/absl/container/inlined_vector.h
+++ b/absl/container/inlined_vector.h
@@ -149,16 +149,7 @@ class InlinedVector {
 
   // Creates a copy of `other` using `other`'s allocator.
   InlinedVector(const InlinedVector& other)
-      : allocator_and_tag_(other.allocator()) {
-    reserve(other.size());
-    if (allocated()) {
-      UninitializedCopy(other.begin(), other.end(), allocated_space());
-      tag().set_allocated_size(other.size());
-    } else {
-      UninitializedCopy(other.begin(), other.end(), inlined_space());
-      tag().set_inline_size(other.size());
-    }
-  }
+      : InlinedVector(other, other.allocator()) {}
 
   // Creates a copy of `other` but with a specified allocator.
   InlinedVector(const InlinedVector& other, const allocator_type& alloc)