[gparted] Add const qualifier to get_custom_text() member functions



commit f6e4390aaf37229e3f027b91fcdffd6045cb01e2
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sat May 16 09:38:22 2015 +0100

    Add const qualifier to get_custom_text() member functions
    
    The function never modifies any member variables so make it a const
    member function.
    
    (FileSystem::get_custom_text() is a virtual function so can't be made
    static).

 include/FileSystem.h |    2 +-
 include/fat16.h      |    2 +-
 include/linux_swap.h |    2 +-
 include/lvm2_pv.h    |    2 +-
 include/ntfs.h       |    2 +-
 src/FileSystem.cc    |    2 +-
 src/fat16.cc         |    2 +-
 src/linux_swap.cc    |    2 +-
 src/lvm2_pv.cc       |    2 +-
 src/ntfs.cc          |    2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/include/FileSystem.h b/include/FileSystem.h
index e79fcd7..30ffa23 100644
--- a/include/FileSystem.h
+++ b/include/FileSystem.h
@@ -34,7 +34,7 @@ public:
        FileSystem() ;
        virtual ~FileSystem() {}
 
-       virtual const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) ;
+       virtual const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) const;
        static const Glib::ustring get_generic_text( CUSTOM_TEXT ttype, int index = 0 ) ;
 
        virtual FS get_filesystem_support() = 0 ;
diff --git a/include/fat16.h b/include/fat16.h
index 84f3847..4285cd3 100644
--- a/include/fat16.h
+++ b/include/fat16.h
@@ -31,7 +31,7 @@ class fat16 : public FileSystem
        Glib::ustring check_cmd ;
 public:
        fat16( enum FILESYSTEM type ) : specific_type( type ), create_cmd( "" ), check_cmd( "" ) {} ;
-       const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) ;
+       const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) const;
        FS get_filesystem_support() ;
        void set_used_sectors( Partition & partition ) ;
        void read_label( Partition & partition ) ;
diff --git a/include/linux_swap.h b/include/linux_swap.h
index 38ab41e..9b05e46 100644
--- a/include/linux_swap.h
+++ b/include/linux_swap.h
@@ -27,7 +27,7 @@ namespace GParted
 class linux_swap : public FileSystem
 {
 public:
-       virtual const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) ;
+       virtual const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) const;
 
        FS get_filesystem_support() ;
        void set_used_sectors( Partition & partition ) ;
diff --git a/include/lvm2_pv.h b/include/lvm2_pv.h
index cdb18db..29c464a 100644
--- a/include/lvm2_pv.h
+++ b/include/lvm2_pv.h
@@ -26,7 +26,7 @@ namespace GParted
 class lvm2_pv : public FileSystem
 {
 public:
-       const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) ;
+       const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) const;
        FS get_filesystem_support() ;
        bool is_busy( const Glib::ustring & path ) ;
        void set_used_sectors( Partition & partition ) ;
diff --git a/include/ntfs.h b/include/ntfs.h
index 714dc90..2a4170c 100644
--- a/include/ntfs.h
+++ b/include/ntfs.h
@@ -27,7 +27,7 @@ namespace GParted
 class ntfs : public FileSystem
 {
 public:
-       const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) ;
+       const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) const;
        FS get_filesystem_support() ;
        void set_used_sectors( Partition & partition ) ;
        void read_label( Partition & partition ) ;
diff --git a/src/FileSystem.cc b/src/FileSystem.cc
index 71bb246..6b7f16c 100644
--- a/src/FileSystem.cc
+++ b/src/FileSystem.cc
@@ -31,7 +31,7 @@ FileSystem::FileSystem()
 {
 }
 
-const Glib::ustring FileSystem::get_custom_text( CUSTOM_TEXT ttype, int index )
+const Glib::ustring FileSystem::get_custom_text( CUSTOM_TEXT ttype, int index ) const
 {
        return get_generic_text( ttype, index ) ;
 }
diff --git a/src/fat16.cc b/src/fat16.cc
index 2e46601..c12bfd7 100644
--- a/src/fat16.cc
+++ b/src/fat16.cc
@@ -43,7 +43,7 @@ const Glib::ustring fat16::Change_UUID_Warning [] =
        ,    ""
        } ;
 
-const Glib::ustring fat16::get_custom_text( CUSTOM_TEXT ttype, int index )
+const Glib::ustring fat16::get_custom_text( CUSTOM_TEXT ttype, int index ) const
 {
        int i ;
        switch ( ttype ) {
diff --git a/src/linux_swap.cc b/src/linux_swap.cc
index 385a9b4..902def1 100644
--- a/src/linux_swap.cc
+++ b/src/linux_swap.cc
@@ -23,7 +23,7 @@
 namespace GParted
 {
 
-const Glib::ustring linux_swap::get_custom_text( CUSTOM_TEXT ttype, int index )
+const Glib::ustring linux_swap::get_custom_text( CUSTOM_TEXT ttype, int index ) const
 {
        /*TO TRANSLATORS: these labels will be used in the partition menu */
        static const Glib::ustring activate_text = _( "_Swapon" ) ;
diff --git a/src/lvm2_pv.cc b/src/lvm2_pv.cc
index 47a872c..e94d4f8 100644
--- a/src/lvm2_pv.cc
+++ b/src/lvm2_pv.cc
@@ -21,7 +21,7 @@
 namespace GParted
 {
 
-const Glib::ustring lvm2_pv::get_custom_text( CUSTOM_TEXT ttype, int index )
+const Glib::ustring lvm2_pv::get_custom_text( CUSTOM_TEXT ttype, int index ) const
 {
        /*TO TRANSLATORS: these labels will be used in the partition menu */
        static const Glib::ustring activate_text = _( "Ac_tivate" ) ;
diff --git a/src/ntfs.cc b/src/ntfs.cc
index 5628b43..96f147f 100644
--- a/src/ntfs.cc
+++ b/src/ntfs.cc
@@ -40,7 +40,7 @@ const Glib::ustring ntfs::Change_UUID_Warning [] =
        ,    ""
        } ;
 
-const Glib::ustring ntfs::get_custom_text( CUSTOM_TEXT ttype, int index )
+const Glib::ustring ntfs::get_custom_text( CUSTOM_TEXT ttype, int index ) const
 {
        int i ;
        switch ( ttype ) {


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