[gparted] Make GParted_Core methods flush_device(), get_device(), etc static



commit 42cd956a541edf1fc4fab808ac0dd76bcd4843b2
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sat Apr 25 13:37:59 2015 +0100

    Make GParted_Core methods flush_device(), get_device(), etc static
    
    GParted_Core methods:
        flush_device()
        get_device()
        get_disk()
        get_device_and_disk()
        destroy_device_and_disk()
        commit()
        commit_to_os()
        settle_device()
    
    This group of methods only call libparted API functions and run external
    executables.  None of them access any GParted_Core member variables.
    Make them all static member functions.

 include/GParted_Core.h |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/include/GParted_Core.h b/include/GParted_Core.h
index 65e8bb0..dd0fcf5 100644
--- a/include/GParted_Core.h
+++ b/include/GParted_Core.h
@@ -189,15 +189,15 @@ private:
        static void init_filesystems();
        static void fini_filesystems();
 
-       bool flush_device( PedDevice * lp_device ) ;
-       bool get_device( const Glib::ustring & device_path, PedDevice *& lp_device, bool flush = false );
-       bool get_disk( PedDevice *& lp_device, PedDisk *& lp_disk, bool strict = true );
-       bool get_device_and_disk( const Glib::ustring & device_path,
-                                 PedDevice*& lp_device, PedDisk*& lp_disk, bool strict = true, bool flush = 
false ) ;
-       void destroy_device_and_disk( PedDevice*& lp_device, PedDisk*& lp_disk ) ;
-       bool commit( PedDisk* lp_disk ) ;
-       bool commit_to_os( PedDisk* lp_disk, std::time_t timeout ) ;
-       void settle_device( std::time_t timeout ) ;
+       static bool flush_device( PedDevice * lp_device );
+       static bool get_device( const Glib::ustring & device_path, PedDevice *& lp_device, bool flush = false 
);
+       static bool get_disk( PedDevice *& lp_device, PedDisk *& lp_disk, bool strict = true );
+       static bool get_device_and_disk( const Glib::ustring & device_path,
+                                        PedDevice*& lp_device, PedDisk*& lp_disk, bool strict = true, bool 
flush = false );
+       static void destroy_device_and_disk( PedDevice*& lp_device, PedDisk*& lp_disk );
+       static bool commit( PedDisk* lp_disk );
+       static bool commit_to_os( PedDisk* lp_disk, std::time_t timeout );
+       static void settle_device( std::time_t timeout );
 
        static PedExceptionOption ped_exception_handler( PedException * e ) ;
 


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