mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 03:27:44 +00:00
LibCrypto+Everywhere: Rename *BigInteger::to_base to to_base_deprecated
This commit is contained in:
parent
63c814fa2f
commit
0ddc2e1f50
17 changed files with 24 additions and 24 deletions
|
@ -203,7 +203,7 @@ DeprecatedString BigFraction::to_deprecated_string(unsigned rounding_threshold)
|
|||
auto const rounded_fraction = rounded(rounding_threshold);
|
||||
|
||||
// We take the unsigned value as we already manage the '-'
|
||||
auto const full_value = rounded_fraction.m_numerator.unsigned_value().to_base(10);
|
||||
auto const full_value = rounded_fraction.m_numerator.unsigned_value().to_base_deprecated(10);
|
||||
int split = full_value.length() - (number_of_digits(rounded_fraction.m_denominator) - 1);
|
||||
|
||||
if (split < 0)
|
||||
|
|
|
@ -51,14 +51,14 @@ SignedBigInteger SignedBigInteger::from_base(u16 N, StringView str)
|
|||
return { move(unsigned_data), sign };
|
||||
}
|
||||
|
||||
DeprecatedString SignedBigInteger::to_base(u16 N) const
|
||||
DeprecatedString SignedBigInteger::to_base_deprecated(u16 N) const
|
||||
{
|
||||
StringBuilder builder;
|
||||
|
||||
if (m_sign)
|
||||
builder.append('-');
|
||||
|
||||
builder.append(m_unsigned_data.to_base(N));
|
||||
builder.append(m_unsigned_data.to_base_deprecated(N));
|
||||
|
||||
return builder.to_deprecated_string();
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
size_t export_data(Bytes, bool remove_leading_zeros = false) const;
|
||||
|
||||
[[nodiscard]] static SignedBigInteger from_base(u16 N, StringView str);
|
||||
[[nodiscard]] DeprecatedString to_base(u16 N) const;
|
||||
[[nodiscard]] DeprecatedString to_base_deprecated(u16 N) const;
|
||||
|
||||
[[nodiscard]] u64 to_u64() const;
|
||||
[[nodiscard]] double to_double(UnsignedBigInteger::RoundingMode rounding_mode = UnsignedBigInteger::RoundingMode::IEEERoundAndTiesToEvenMantissa) const;
|
||||
|
|
|
@ -146,7 +146,7 @@ UnsignedBigInteger UnsignedBigInteger::from_base(u16 N, StringView str)
|
|||
return result;
|
||||
}
|
||||
|
||||
DeprecatedString UnsignedBigInteger::to_base(u16 N) const
|
||||
DeprecatedString UnsignedBigInteger::to_base_deprecated(u16 N) const
|
||||
{
|
||||
VERIFY(N <= 36);
|
||||
if (*this == UnsignedBigInteger { 0 })
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
size_t export_data(Bytes, bool remove_leading_zeros = false) const;
|
||||
|
||||
[[nodiscard]] static UnsignedBigInteger from_base(u16 N, StringView str);
|
||||
[[nodiscard]] DeprecatedString to_base(u16 N) const;
|
||||
[[nodiscard]] DeprecatedString to_base_deprecated(u16 N) const;
|
||||
|
||||
[[nodiscard]] u64 to_u64() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue