[libcalamares] Fix constness of functions

This commit is contained in:
Gaël PORTAY 2020-10-28 11:38:01 -04:00
parent aec066359a
commit 03df5f6891
2 changed files with 4 additions and 4 deletions

View file

@ -27,14 +27,14 @@ using ::Device;
using ::Partition; using ::Partition;
bool bool
isPartitionFreeSpace( Partition* partition ) isPartitionFreeSpace( const Partition* partition )
{ {
return partition->roles().has( PartitionRole::Unallocated ); return partition->roles().has( PartitionRole::Unallocated );
} }
bool bool
isPartitionNew( Partition* partition ) isPartitionNew( const Partition* partition )
{ {
#if defined( WITH_KPMCORE4API ) #if defined( WITH_KPMCORE4API )
constexpr auto NewState = Partition::State::New; constexpr auto NewState = Partition::State::New;

View file

@ -34,14 +34,14 @@ using ::Device;
using ::Partition; using ::Partition;
/** @brief Is this a free-space area? */ /** @brief Is this a free-space area? */
bool isPartitionFreeSpace( Partition* ); bool isPartitionFreeSpace( const Partition* );
/** @brief Is this partition newly-to-be-created? /** @brief Is this partition newly-to-be-created?
* *
* Returns true if the partition is planned to be created by the installer as * Returns true if the partition is planned to be created by the installer as
* opposed to already existing on the disk. * opposed to already existing on the disk.
*/ */
bool isPartitionNew( Partition* ); bool isPartitionNew( const Partition* );
/** /**
* Iterates on all devices and return the first partition which is (already) * Iterates on all devices and return the first partition which is (already)