Bug 868874 - Remove Decimal::toString(char*, size_t). r=jwatt,dom-core,sefeng

Differential Revision: https://phabricator.services.mozilla.com/D216041
This commit is contained in:
Vincent Hilla
2024-10-22 13:21:56 +00:00
parent 257d5eb9f2
commit e68a44cb57
4 changed files with 4 additions and 28 deletions

View File

@@ -974,19 +974,6 @@ String Decimal::toString() const
return builder.toString();
}
bool Decimal::toString(char* strBuf, size_t bufLength) const
{
ASSERT(bufLength > 0);
String str = toString();
size_t length = str.copy(strBuf, bufLength);
if (length < bufLength) {
strBuf[length] = '\0';
return true;
}
strBuf[bufLength - 1] = '\0';
return false;
}
Decimal Decimal::zero(Sign sign)
{
return Decimal(EncodedData(sign, EncodedData::ClassZero));

View File

@@ -222,7 +222,6 @@ public:
MFBT_API double toDouble() const;
// Note: toString method supports infinity and nan but fromString not.
MFBT_API std::string toString() const;
MFBT_API bool toString(char* strBuf, size_t bufLength) const;
static MFBT_API Decimal fromDouble(double);
// fromString supports following syntax EBNF: