[partition] Use const QString&

- minor code-layout and idiomatic-C++
This commit is contained in:
Adriaan de Groot 2019-02-11 17:27:45 -05:00
parent abf1f14604
commit 5863300f67
2 changed files with 5 additions and 5 deletions

View File

@ -53,7 +53,7 @@ PartitionLayout::addEntry( PartitionLayout::PartitionEntry entry )
}
static double
parseSizeString( QString sizeString, PartitionLayout::SizeUnit *unit )
parseSizeString( const QString& sizeString, PartitionLayout::SizeUnit* unit )
{
double value;
bool ok;
@ -103,7 +103,7 @@ parseSizeString( QString sizeString, PartitionLayout::SizeUnit *unit )
}
void
PartitionLayout::addEntry( QString mountPoint, QString size, QString min )
PartitionLayout::addEntry( const QString& mountPoint, const QString& size, const QString& min )
{
PartitionLayout::PartitionEntry entry;
@ -119,7 +119,7 @@ PartitionLayout::addEntry( QString mountPoint, QString size, QString min )
}
void
PartitionLayout::addEntry( QString label, QString mountPoint, QString fs, QString size, QString min )
PartitionLayout::addEntry( const QString& label, const QString& mountPoint, const QString& fs, const QString& size, const QString& min )
{
PartitionLayout::PartitionEntry entry;

View File

@ -61,8 +61,8 @@ public:
~PartitionLayout();
void addEntry( PartitionEntry entry );
void addEntry( QString mountPoint, QString size, QString min = "" );
void addEntry( QString label, QString mountPoint, QString fs, QString size, QString min = "" );
void addEntry( const QString& mountPoint, const QString& size, const QString& min = QString() );
void addEntry( const QString& label, const QString& mountPoint, const QString& fs, const QString& size, const QString& min = QString() );
/**
* @brief Apply the current partition layout to the selected drive space.