if capacity < initialSize {
capacity = initialSize
}
+ if capacity < length {
+ capacity = length
+ }
b = make(IntVector, length, capacity)
copy(b, *p)
*p = b
// AppendVector appends the entire vector x to the end of this vector.
-func (p *IntVector) AppendVector(x *IntVector) {
- p.InsertVector(len(*p), x)
-}
+func (p *IntVector) AppendVector(x *IntVector) { p.InsertVector(len(*p), x) }
// Swap exchanges the elements at indexes i and j.
if capacity < initialSize {
capacity = initialSize
}
+ if capacity < length {
+ capacity = length
+ }
b = make(StringVector, length, capacity)
copy(b, *p)
*p = b
// AppendVector appends the entire vector x to the end of this vector.
-func (p *StringVector) AppendVector(x *StringVector) {
- p.InsertVector(len(*p), x)
-}
+func (p *StringVector) AppendVector(x *StringVector) { p.InsertVector(len(*p), x) }
// Swap exchanges the elements at indexes i and j.
if capacity < initialSize {
capacity = initialSize
}
+ if capacity < length {
+ capacity = length
+ }
b = make(Vector, length, capacity)
copy(b, *p)
*p = b