From 455dc17ba1af9635f0b60155bc565bc572a1e722 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Sun, 9 Dec 2018 14:25:52 -0800 Subject: Export of internal Abseil changes. -- bbb50c2e52241f0a5f8478bac89e6523ec8fd664 by CJ Johnson : The two InlinedVector copy constructors have identical definitions. This CL simply defines one in terms of the other PiperOrigin-RevId: 224734857 GitOrigin-RevId: bbb50c2e52241f0a5f8478bac89e6523ec8fd664 Change-Id: I617c239fd4f16fde0aa10a15fdac58a0cfd10f8a --- absl/container/inlined_vector.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'absl/container/inlined_vector.h') diff --git a/absl/container/inlined_vector.h b/absl/container/inlined_vector.h index e7c43ff..0f10036 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) -- cgit v1.2.3