[gparted] Remove unused clear_mountpoints parameter from add_mountpoint*()



commit 0f76b8f8ffd04e1e0d23b093bc9c05f45712868b
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Thu Dec 15 16:08:54 2016 +0000

    Remove unused clear_mountpoints parameter from add_mountpoint*()
    
    The clear_mountpoints parameter has never been used since
    add_mountpoint*() were first added [1][2].  clear_mountpoints() method
    [3] is available to provide this functionality and used.  Therefore
    removed unused parameter and code.
    
    [1] add_mountpoints() added 2006-03-15
            9532c3cad127483f851b4cbc9852eb10f22741c6
            Made Partition::mountpoints private
    
    [2] add_mountpoint() added 2011-12-16
            208083f11d84dbd4f186271a3cdbf5170db259f8b8
            Display LVM2 VGNAME as the PV's mount point (#160787)
    
    [3] clear_mountpoint() added 2006-03-19
            ad9f2126e7fc92c16fffe839847dfe1c520146c8
            fixed issues with copying (see also #335004) cleanups + added FIXME added

 include/Partition.h |    4 ++--
 src/Partition.cc    |   10 ++--------
 2 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/include/Partition.h b/include/Partition.h
index b9b1414..8475d69 100644
--- a/include/Partition.h
+++ b/include/Partition.h
@@ -106,8 +106,8 @@ public:
        Byte_Value get_byte_length() const ;
        Sector get_sector_length() const ; 
        Glib::ustring get_path() const ;
-       void add_mountpoint( const Glib::ustring & mountpoint, bool clear_mountpoints = false ) ;
-       void add_mountpoints( const std::vector<Glib::ustring> & mountpoints, bool clear_mountpoints = false 
) ;
+       void add_mountpoint( const Glib::ustring & mountpoint );
+       void add_mountpoints( const std::vector<Glib::ustring> & mountpoints );
        Glib::ustring get_mountpoint() const ; 
        void clear_mountpoints() ;
        std::vector<Glib::ustring> get_mountpoints() const ;
diff --git a/src/Partition.cc b/src/Partition.cc
index 723e823..b5c5967 100644
--- a/src/Partition.cc
+++ b/src/Partition.cc
@@ -322,19 +322,13 @@ void Partition::get_usage_triple_helper( Sector stot, Sector s1, Sector s2, Sect
        }
 }
 
-void Partition::add_mountpoint( const Glib::ustring & mountpoint, bool clear_mountpoints )
+void Partition::add_mountpoint( const Glib::ustring & mountpoint )
 {
-       if ( clear_mountpoints )
-               this ->mountpoints .clear() ;
-
        this ->mountpoints .push_back( mountpoint ) ;
 }
 
-void Partition::add_mountpoints( const std::vector<Glib::ustring> & mountpoints, bool clear_mountpoints ) 
+void Partition::add_mountpoints( const std::vector<Glib::ustring> & mountpoints )
 {
-       if ( clear_mountpoints )
-               this ->mountpoints .clear() ;
-
        this ->mountpoints .insert( this ->mountpoints .end(), mountpoints .begin(), mountpoints .end() ) ;
 }
 


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