summaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2018-12-09 14:25:52 -0800
committerGravatar jueminyang <jueminyang@google.com>2018-12-10 10:58:40 -0500
commit455dc17ba1af9635f0b60155bc565bc572a1e722 (patch)
tree0b567adfecc44b58819b225e1049b67bbe3ec023 /absl
parentf197d7c72a54064cfde5a2058f1513a4a0ee36fb (diff)
Export of internal Abseil changes.
-- bbb50c2e52241f0a5f8478bac89e6523ec8fd664 by CJ Johnson <johnsoncj@google.com>: 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
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 e7c43ff3..0f100360 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)