[gparted] Remove copy constructing add item methods from PartitionVector (#759726)



commit 504a2d8393dbe6f5db4deb88a346b813e265d5a3
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Mon Dec 7 12:57:53 2015 +0000

    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

 include/PartitionVector.h |    2 --
 src/PartitionVector.cc    |   12 ------------
 2 files changed, 0 insertions(+), 14 deletions(-)
---
diff --git a/include/PartitionVector.h b/include/PartitionVector.h
index 1f0f67a..5eb89b3 100644
--- a/include/PartitionVector.h
+++ b/include/PartitionVector.h
@@ -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 );
 
diff --git a/src/PartitionVector.cc b/src/PartitionVector.cc
index c35ebf9..2e7ee1b 100644
--- a/src/PartitionVector.cc
+++ b/src/PartitionVector.cc
@@ -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 );


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]