mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-08-27 11:40:03 +00:00
Remove copy constructing add item methods from PartitionVector (#759726)
Remove PartitionVector push_back() and insert() methods which copy construct Partitions objects into the vector. All the code has already been changed to dynamically allocate Partition objects and use the adoption variants of these methods named, push_back_adopt() and insert_adopt(). Remove the no longer used methods. Bug 759726 - Implement Partition object polymorphism
This commit is contained in:
parent
f6b45a0429
commit
504a2d8393
|
@ -69,8 +69,6 @@ public:
|
|||
void pop_back();
|
||||
void erase( const iterator position );
|
||||
void clear();
|
||||
void push_back( const Partition & partition );
|
||||
void insert( iterator position, const Partition & partition );
|
||||
void push_back_adopt( Partition * partition );
|
||||
void insert_adopt( iterator position, Partition * partition );
|
||||
|
||||
|
|
|
@ -73,18 +73,6 @@ void PartitionVector::clear()
|
|||
v.clear();
|
||||
}
|
||||
|
||||
void PartitionVector::push_back( const Partition & partition )
|
||||
{
|
||||
Partition * p = new Partition( partition );
|
||||
v.push_back( p );
|
||||
}
|
||||
|
||||
void PartitionVector::insert( iterator position, const Partition & partition )
|
||||
{
|
||||
Partition * p = new Partition( partition );
|
||||
v.insert( position, p );
|
||||
}
|
||||
|
||||
void PartitionVector::push_back_adopt( Partition * partition )
|
||||
{
|
||||
v.push_back( partition );
|
||||
|
|
Loading…
Reference in a new issue