mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-21 05:43:10 -07:00
Merge 150f905bde
into 06eb235d48
This commit is contained in:
commit
66b6e80172
3 changed files with 5 additions and 8 deletions
|
@ -522,8 +522,7 @@ void CCalcEngine::ProcessCommandWorker(OpCode wParam)
|
||||||
ResolveHighestPrecedenceOperation();
|
ResolveHighestPrecedenceOperation();
|
||||||
while (m_fPrecedence && m_precedenceOpCount > 0)
|
while (m_fPrecedence && m_precedenceOpCount > 0)
|
||||||
{
|
{
|
||||||
m_precedenceOpCount--;
|
m_nOpCode = m_nPrecOp[--m_precedenceOpCount];
|
||||||
m_nOpCode = m_nPrecOp[m_precedenceOpCount];
|
|
||||||
m_lastVal = m_precedenceVals[m_precedenceOpCount];
|
m_lastVal = m_precedenceVals[m_precedenceOpCount];
|
||||||
|
|
||||||
// Precedence Inversion check
|
// Precedence Inversion check
|
||||||
|
@ -643,9 +642,7 @@ void CCalcEngine::ProcessCommandWorker(OpCode wParam)
|
||||||
m_HistoryCollector.AddCloseBraceToHistory();
|
m_HistoryCollector.AddCloseBraceToHistory();
|
||||||
|
|
||||||
// Now get back the operation and opcode at the beginning of this parenthesis pair
|
// Now get back the operation and opcode at the beginning of this parenthesis pair
|
||||||
|
m_lastVal = m_parenVals[--m_openParenCount];
|
||||||
m_openParenCount -= 1;
|
|
||||||
m_lastVal = m_parenVals[m_openParenCount];
|
|
||||||
m_nOpCode = m_nOp[m_openParenCount];
|
m_nOpCode = m_nOp[m_openParenCount];
|
||||||
|
|
||||||
// m_bChangeOp should be true if m_nOpCode is valid
|
// m_bChangeOp should be true if m_nOpCode is valid
|
||||||
|
|
|
@ -298,7 +298,7 @@ void _divnumx(PNUMBER* pa, PNUMBER b, int32_t precision)
|
||||||
|
|
||||||
while (cdigits++ < thismax && !zernum(rem))
|
while (cdigits++ < thismax && !zernum(rem))
|
||||||
{
|
{
|
||||||
int32_t digit = 0;
|
MANTTYPE digit = 0;
|
||||||
*ptrc = 0;
|
*ptrc = 0;
|
||||||
while (!lessnum(rem, b))
|
while (!lessnum(rem, b))
|
||||||
{
|
{
|
||||||
|
@ -334,7 +334,7 @@ void _divnumx(PNUMBER* pa, PNUMBER b, int32_t precision)
|
||||||
cdigits--;
|
cdigits--;
|
||||||
if (c->mant != ++ptrc)
|
if (c->mant != ++ptrc)
|
||||||
{
|
{
|
||||||
memmove(c->mant, ptrc, (int)(cdigits * sizeof(MANTTYPE)));
|
memmove(c->mant, ptrc, cdigits * sizeof(MANTTYPE));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cdigits)
|
if (!cdigits)
|
||||||
|
|
|
@ -624,7 +624,7 @@ void StandardCalculatorViewModel::HandleUpdatedOperandData(Command cmdenum)
|
||||||
temp[i] = data[j++];
|
temp[i] = data[j++];
|
||||||
}
|
}
|
||||||
temp[i] = L'\0';
|
temp[i] = L'\0';
|
||||||
commandIndex += 1;
|
commandIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue