[libcalamares] Start deprecating signed sizes

This commit is contained in:
Adriaan de Groot 2022-03-22 15:14:33 +01:00
parent 97031ea3e6
commit f888cb87d1

View File

@ -17,6 +17,8 @@
namespace CalamaresUtils
{
/// @brief Type for expressing units
using intunit_t = quint64;
namespace Units
{
@ -137,12 +139,19 @@ BytesToMiB( qint64 b )
return int( b / 1024 / 1024 );
}
// TODO: deprecate signed version
constexpr int
BytesToGiB( qint64 b )
{
return int( b / 1024 / 1024 / 1024 );
}
constexpr intunit_t
BytesToGiB( intunit_t b )
{
return b / 1024 / 1024 / 1024;
}
constexpr qint64
alignBytesToBlockSize( qint64 bytes, qint64 blocksize )
{