Cleanup: remove duplicate #define

This commit is contained in:
Adriaan de Groot 2017-06-12 03:32:22 -04:00
parent 99b00229b6
commit 829f72363e

View File

@ -34,14 +34,12 @@
namespace PartitionActions namespace PartitionActions
{ {
#define MiB * static_cast< qint64 >( 1024 ) * 1024
#define GiB * static_cast< qint64 >( 1024 ) * 1024 * 1024
qint64 qint64
swapSuggestion( const qint64 availableSpaceB ) swapSuggestion( const qint64 availableSpaceB )
{ {
#define MiB * static_cast< qint64 >( 1024 ) * 1024
#define GiB * static_cast< qint64 >( 1024 ) * 1024 * 1024
// swap(mem) = max(2, 2 * mem), if mem < 2 GiB // swap(mem) = max(2, 2 * mem), if mem < 2 GiB
// = mem, if 2 GiB <= mem < 8 GiB // = mem, if 2 GiB <= mem < 8 GiB
// = mem / 2, if 8 GIB <= mem < 64 GiB // = mem / 2, if 8 GIB <= mem < 64 GiB
@ -110,9 +108,6 @@ doAutopartition( PartitionCoreModule* core, Device* dev, const QString& luksPass
if ( FileSystem::typeForName( defaultFsType ) == FileSystem::Unknown ) if ( FileSystem::typeForName( defaultFsType ) == FileSystem::Unknown )
defaultFsType = "ext4"; defaultFsType = "ext4";
#define MiB * static_cast< qint64 >( 1024 ) * 1024
#define GiB * static_cast< qint64 >( 1024 ) * 1024 * 1024
// Partition sizes are expressed in MiB, should be multiples of // Partition sizes are expressed in MiB, should be multiples of
// the logical sector size (usually 512B). // the logical sector size (usually 512B).
int uefisys_part_size = 0; int uefisys_part_size = 0;