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
This commit is contained in:
parent
f197d7c72a
commit
455dc17ba1
1 changed files with 1 additions and 10 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue