Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Digit should be MANTTYPE #1923

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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