mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-08-27 11:40:03 +00:00
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:
parent
d0580d5955
commit
f6e4390aaf
|
@ -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 ;
|
||||
|
|
|
@ -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 ) ;
|
||||
|
|
|
@ -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 ) ;
|
||||
|
|
|
@ -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 ) ;
|
||||
|
|
|
@ -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 ) ;
|
||||
|
|
|
@ -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 ) ;
|
||||
}
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
|
@ -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" ) ;
|
||||
|
|
|
@ -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" ) ;
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue