mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
Update Number initializer to copy the vector's contents directly
This commit is contained in:
parent
a2a3489a74
commit
a4522ae0fe
1 changed files with 2 additions and 5 deletions
|
@ -20,11 +20,8 @@ namespace CalcEngine
|
||||||
Number::Number(PNUMBER p) noexcept :
|
Number::Number(PNUMBER p) noexcept :
|
||||||
m_sign{ p->sign },
|
m_sign{ p->sign },
|
||||||
m_exp{ p->exp },
|
m_exp{ p->exp },
|
||||||
m_mantissa{}
|
m_mantissa{ p->mant }
|
||||||
{
|
{}
|
||||||
m_mantissa.reserve(p->cdigit);
|
|
||||||
copy(p->mant.begin(), p->mant.begin() + p->cdigit, back_inserter(m_mantissa));
|
|
||||||
}
|
|
||||||
|
|
||||||
PNUMBER Number::ToPNUMBER() const
|
PNUMBER Number::ToPNUMBER() const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue