mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-25 19:35:44 -05:00
[libcalamares] Start deprecating signed sizes
This commit is contained in:
parent
97031ea3e6
commit
f888cb87d1
1 changed files with 9 additions and 0 deletions
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue