Update Number initializer to copy the vector's contents directly

This commit is contained in:
fwcd 2019-04-06 19:16:22 +02:00
commit a4522ae0fe

View file

@ -20,11 +20,8 @@ namespace CalcEngine
Number::Number(PNUMBER p) noexcept :
m_sign{ p->sign },
m_exp{ p->exp },
m_mantissa{}
{
m_mantissa.reserve(p->cdigit);
copy(p->mant.begin(), p->mant.begin() + p->cdigit, back_inserter(m_mantissa));
}
m_mantissa{ p->mant }
{}
PNUMBER Number::ToPNUMBER() const
{