mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 22:23:29 -07:00
Update conv.cpp
This commit is contained in:
parent
bd2beb9edc
commit
06acd7d544
1 changed files with 3 additions and 3 deletions
|
@ -610,7 +610,7 @@ wchar_t NormalizeCharDigit(wchar_t c, uint32_t radix)
|
||||||
PNUMBER StringToNumber(wstring_view numberString, uint32_t radix, int32_t precision)
|
PNUMBER StringToNumber(wstring_view numberString, uint32_t radix, int32_t precision)
|
||||||
{
|
{
|
||||||
int32_t expSign = 1L; // expSign is exponent sign ( +/- 1 )
|
int32_t expSign = 1L; // expSign is exponent sign ( +/- 1 )
|
||||||
int32_t expValue = 0L; // expValue is exponent mantissa, should be unsigned
|
uint32_t expValue = 0L; // expValue is exponent mantissa, should be unsigned
|
||||||
|
|
||||||
PNUMBER pnumret = nullptr;
|
PNUMBER pnumret = nullptr;
|
||||||
createnum(pnumret, static_cast<uint32_t>(numberString.length()));
|
createnum(pnumret, static_cast<uint32_t>(numberString.length()));
|
||||||
|
@ -671,7 +671,7 @@ PNUMBER StringToNumber(wstring_view numberString, uint32_t radix, int32_t precis
|
||||||
if (pos != wstring_view::npos)
|
if (pos != wstring_view::npos)
|
||||||
{
|
{
|
||||||
expValue *= radix;
|
expValue *= radix;
|
||||||
expValue += static_cast<int32_t>(pos);
|
expValue += static_cast<uint32_t>(pos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue