Skip to content

Commit

Permalink
Digit should be MANTTYPE
Browse files Browse the repository at this point in the history
It makes more sense that way, especially when directly cast to one.
  • Loading branch information
AZero13 committed Jul 19, 2023
1 parent b0f3002 commit d849421
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions src/CalcManager/CEngine/scicomm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,7 @@ void CCalcEngine::ProcessCommandWorker(OpCode wParam)
ResolveHighestPrecedenceOperation();
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];

// Precedence Inversion check
Expand Down Expand Up @@ -601,9 +600,7 @@ void CCalcEngine::ProcessCommandWorker(OpCode wParam)
m_HistoryCollector.AddCloseBraceToHistory();

// Now get back the operation and opcode at the beginning of this parenthesis pair

m_openParenCount -= 1;
m_lastVal = m_parenVals[m_openParenCount];
m_lastVal = m_parenVals[--m_openParenCount];
m_nOpCode = m_nOp[m_openParenCount];

// m_bChangeOp should be true if m_nOpCode is valid
Expand Down
4 changes: 2 additions & 2 deletions src/CalcManager/Ratpack/basex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ void _divnumx(PNUMBER* pa, PNUMBER b, int32_t precision)

while (cdigits++ < thismax && !zernum(rem))
{
int32_t digit = 0;
MANTTYPE digit = 0;
*ptrc = 0;
while (!lessnum(rem, b))
{
Expand Down Expand Up @@ -334,7 +334,7 @@ void _divnumx(PNUMBER* pa, PNUMBER b, int32_t precision)
cdigits--;
if (c->mant != ++ptrc)
{
memmove(c->mant, ptrc, (int)(cdigits * sizeof(MANTTYPE)));
memmove(c->mant, ptrc, cdigits * sizeof(MANTTYPE));
}

if (!cdigits)
Expand Down
2 changes: 1 addition & 1 deletion src/CalcViewModel/StandardCalculatorViewModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ void StandardCalculatorViewModel::HandleUpdatedOperandData(Command cmdenum)
temp[i] = data[j++];
}
temp[i] = L'\0';
commandIndex += 1;
commandIndex++;
}
}

Expand Down

0 comments on commit d849421

Please sign in to comment.