Fix compilation issues due to unsigned/signed warnings treated as errors (#317)
This commit is contained in:
committed by
Daniel Belcher
parent
4a41e37c87
commit
e40791d7ad
@@ -36,7 +36,7 @@ namespace {
|
||||
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,
|
||||
IDC_MOD,3, IDC_DIV,3, IDC_MUL,3, IDC_PWR,4, IDC_ROOT, 4 };
|
||||
int iPrec;
|
||||
unsigned int iPrec;
|
||||
|
||||
iPrec = 0;
|
||||
while ((iPrec < size(rgbPrec)) && (nopCode != rgbPrec[iPrec]))
|
||||
@@ -947,7 +947,7 @@ wstring_view CCalcEngine::OpCodeToUnaryString(int nOpCode, bool fInv, ANGLE_TYPE
|
||||
// Try to lookup the ID in the UFNE table
|
||||
int ids = 0;
|
||||
int iufne = nOpCode - IDC_UNARYFIRST;
|
||||
if (iufne >= 0 && iufne < size(rgUfne))
|
||||
if (iufne >= 0 && (size_t)iufne < size(rgUfne))
|
||||
{
|
||||
if (fInv)
|
||||
{
|
||||
|
@@ -56,7 +56,7 @@ LONG CCalcEngine::DwWordBitWidthFromeNumWidth(NUM_WIDTH /*numwidth*/)
|
||||
static constexpr int nBitMax[] = { 64, 32, 16, 8 };
|
||||
LONG wmax = nBitMax[0];
|
||||
|
||||
if (m_numwidth >= 0 && m_numwidth < size(nBitMax))
|
||||
if (m_numwidth >= 0 && (size_t)m_numwidth < size(nBitMax))
|
||||
{
|
||||
wmax = nBitMax[m_numwidth];
|
||||
}
|
||||
@@ -69,7 +69,7 @@ uint32_t CCalcEngine::NRadixFromRadixType(RADIX_TYPE radixtype)
|
||||
uint32_t radix = 10;
|
||||
|
||||
// convert special bases into symbolic values
|
||||
if (radixtype >= 0 && radixtype < size(rgnRadish))
|
||||
if (radixtype >= 0 && (size_t)radixtype < size(rgnRadish))
|
||||
{
|
||||
radix = rgnRadish[radixtype];
|
||||
}
|
||||
|
Reference in New Issue
Block a user