mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
Update implementation of Number to use the new std::vector mantissa
This commit is contained in:
parent
3355947ed8
commit
c09525471a
1 changed files with 2 additions and 8 deletions
|
@ -23,7 +23,7 @@ namespace CalcEngine
|
|||
m_mantissa{}
|
||||
{
|
||||
m_mantissa.reserve(p->cdigit);
|
||||
copy(p->mant, p->mant + p->cdigit, back_inserter(m_mantissa));
|
||||
copy(p->mant.begin(), p->mant.begin() + p->cdigit, back_inserter(m_mantissa));
|
||||
}
|
||||
|
||||
PNUMBER Number::ToPNUMBER() const
|
||||
|
@ -32,13 +32,7 @@ namespace CalcEngine
|
|||
ret->sign = this->Sign();
|
||||
ret->exp = this->Exp();
|
||||
ret->cdigit = static_cast<int32_t>(this->Mantissa().size());
|
||||
|
||||
MANTTYPE *ptrRet = ret->mant;
|
||||
for (auto const& digit : this->Mantissa())
|
||||
{
|
||||
*ptrRet++ = digit;
|
||||
}
|
||||
|
||||
ret->mant = this->Mantissa();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue