mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
Replace INT -> int
This commit is contained in:
parent
ea4c4ea45f
commit
3a85bbe244
2 changed files with 9 additions and 9 deletions
|
@ -31,7 +31,7 @@ namespace {
|
|||
//
|
||||
// returns a virtual number for precedence for the operator. We expect binary operator only, otherwise the lowest number
|
||||
// 0 is returned. Higher the number, higher the precedence of the operator.
|
||||
INT NPrecedenceOfOp(int nopCode)
|
||||
int NPrecedenceOfOp(int nopCode)
|
||||
{
|
||||
static BYTE rgbPrec[] = { 0,0, IDC_OR,0, IDC_XOR,0, IDC_AND,1,
|
||||
IDC_ADD,2, IDC_SUB,2, IDC_RSHF,3, IDC_LSHF,3,
|
||||
|
@ -96,7 +96,7 @@ void CCalcEngine::ProcessCommand(WPARAM wParam)
|
|||
|
||||
void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
|
||||
{
|
||||
INT nx, ni;
|
||||
int nx, ni;
|
||||
|
||||
// Save the last command. Some commands are not saved in this manor, these
|
||||
// commands are:
|
||||
|
@ -107,7 +107,7 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
|
|||
if (!IsGuiSettingOpCode(wParam))
|
||||
{
|
||||
m_nLastCom = m_nTempCom;
|
||||
m_nTempCom = (INT)wParam;
|
||||
m_nTempCom = (int)wParam;
|
||||
}
|
||||
|
||||
if (m_bError)
|
||||
|
@ -185,10 +185,10 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
|
|||
// Change the operation if last input was operation.
|
||||
if (IsBinOpCode(m_nLastCom))
|
||||
{
|
||||
INT nPrev;
|
||||
int nPrev;
|
||||
bool fPrecInvToHigher = false; // Is Precedence Inversion from lower to higher precedence happening ??
|
||||
|
||||
m_nOpCode = (INT)wParam;
|
||||
m_nOpCode = (int)wParam;
|
||||
|
||||
// Check to see if by changing this binop, a Precedence inversion is happening.
|
||||
// Eg. 1 * 2 + and + is getting changed to ^. The previous precedence rules would have already computed
|
||||
|
@ -285,7 +285,7 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
|
|||
DisplayAnnounceBinaryOperator();
|
||||
|
||||
m_lastVal = m_currentVal;
|
||||
m_nOpCode = (INT)wParam;
|
||||
m_nOpCode = (int)wParam;
|
||||
m_HistoryCollector.AddBinOpToHistory(m_nOpCode);
|
||||
m_bNoPrevEqu = m_bChangeOp = true;
|
||||
return;
|
||||
|
@ -313,7 +313,7 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
|
|||
m_HistoryCollector.AddOpndToHistory(m_numberString, m_currentVal);
|
||||
}
|
||||
|
||||
m_HistoryCollector.AddUnaryOpToHistory((INT)wParam, m_bInv, m_angletype);
|
||||
m_HistoryCollector.AddUnaryOpToHistory((int)wParam, m_bInv, m_angletype);
|
||||
}
|
||||
|
||||
if ((wParam == IDC_SIN) || (wParam == IDC_COS) || (wParam == IDC_TAN) || (wParam == IDC_SINH) || (wParam == IDC_COSH) || (wParam == IDC_TANH))
|
||||
|
@ -442,7 +442,7 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
|
|||
m_nTempCom = m_nLastCom; // Put back this last saved command to the prev state so ) can be handled properly
|
||||
ProcessCommand(IDC_CLOSEP);
|
||||
m_nLastCom = m_nTempCom; // Actually this is IDC_CLOSEP
|
||||
m_nTempCom = (INT)wParam; // put back in the state where last op seen was IDC_CLOSEP, and current op is IDC_EQU
|
||||
m_nTempCom = (int)wParam; // put back in the state where last op seen was IDC_CLOSEP, and current op is IDC_EQU
|
||||
}
|
||||
|
||||
if (!m_bNoPrevEqu)
|
||||
|
|
|
@ -39,7 +39,7 @@ typedef struct {
|
|||
Rational value;
|
||||
int32_t precision;
|
||||
uint32_t radix;
|
||||
INT nFE;
|
||||
int nFE;
|
||||
NUM_WIDTH numwidth;
|
||||
bool fIntMath;
|
||||
bool bRecord;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue