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).
This commit is contained in:
Mike Fleetwood 2015-05-16 09:38:22 +01:00 committed by Curtis Gedak
parent d0580d5955
commit f6e4390aaf
10 changed files with 10 additions and 10 deletions

View file

@ -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 ;

View file

@ -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 ) ;

View file

@ -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 ) ;

View file

@ -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 ) ;

View file

@ -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 ) ;

View file

@ -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 ) ;
}

View file

@ -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 ) {

View file

@ -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" ) ;

View file

@ -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" ) ;

View file

@ -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 ) {