From 32e700c952e99bd08fe95bd0eba7811346fc7c6f Mon Sep 17 00:00:00 2001 From: fwcd Date: Sat, 6 Apr 2019 23:01:26 +0200 Subject: [PATCH] Replace iterator in numtoi32 with index (conv.cpp) --- src/CalcManager/Ratpack/conv.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/CalcManager/Ratpack/conv.cpp b/src/CalcManager/Ratpack/conv.cpp index b4af9d38..81ad0407 100644 --- a/src/CalcManager/Ratpack/conv.cpp +++ b/src/CalcManager/Ratpack/conv.cpp @@ -1027,14 +1027,13 @@ int32_t numtoi32( _In_ PNUMBER pnum, uint32_t radix ) { int32_t lret = 0; - vector::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)