mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
Replace iterator in numtoi32 with index (conv.cpp)
This commit is contained in:
parent
6035571b96
commit
32e700c952
1 changed files with 2 additions and 3 deletions
|
@ -1027,14 +1027,13 @@ int32_t numtoi32( _In_ PNUMBER pnum, uint32_t radix )
|
|||
{
|
||||
int32_t lret = 0;
|
||||
|
||||
vector<MANTTYPE>::iterator pmant = pnum->mant.begin();
|
||||
pmant += pnum->cdigit - 1;
|
||||
int32_t imant = pnum->cdigit - 1;
|
||||
|
||||
int32_t expt = pnum->exp;
|
||||
for (int32_t length = pnum->cdigit; length > 0 && length + expt > 0; length--)
|
||||
{
|
||||
lret *= radix;
|
||||
lret += *(pmant--);
|
||||
lret += pnum->mant[imant--];
|
||||
}
|
||||
|
||||
while (expt-- > 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue