Build with /W4 (#197)

All projects are built with warning level 4 (/W4) and treat warnings as errors (/WX).
Fixed build errors resulting from enabling these compiler flags.
This commit is contained in:
Brett Waldbaum
2019-03-08 23:15:28 -08:00
committed by GitHub
parent e0f70e8c37
commit 64c6493312
30 changed files with 240 additions and 188 deletions

View File

@@ -261,7 +261,7 @@ void CalcInput::SetDecimalSymbol(wchar_t decSymbol)
}
}
wstring CalcInput::ToString(uint32_t radix, bool isIntegerMode)
wstring CalcInput::ToString(uint32_t radix)
{
// In theory both the base and exponent could be C_NUM_MAX_DIGITS long.
wstringstream resStream;

View File

@@ -223,11 +223,11 @@ void CHistoryCollector::AddUnaryOpToHistory(int nOpCode, bool fInv, ANGLE_TYPE a
{
angleOpCode = CalculationManager::Command::CommandDEG;
}
if (angletype == ANGLE_RAD)
else if (angletype == ANGLE_RAD)
{
angleOpCode = CalculationManager::Command::CommandRAD;
}
if (angletype == ANGLE_GRAD)
else // (angletype == ANGLE_GRAD)
{
angleOpCode = CalculationManager::Command::CommandGRAD;
}
@@ -428,7 +428,7 @@ void CHistoryCollector::UpdateHistoryExpression(uint32_t radix, int32_t precisio
std::shared_ptr<COpndCommand> opndCommand = std::static_pointer_cast<COpndCommand>(expCommand);
if (opndCommand != nullptr)
{
token.first = opndCommand->GetString(radix, precision, m_decimalSymbol);
token.first = opndCommand->GetString(radix, precision);
IFT(m_spTokens->SetAt(i, token));
opndCommand->SetCommands(GetOperandCommandsFromString(token.first));
}

View File

@@ -104,7 +104,7 @@ void CCalcEngine::DisplayNum(void)
if (m_bRecord)
{
// Display the string and return.
m_numberString = m_input.ToString(m_radix, m_fIntegerMode);
m_numberString = m_input.ToString(m_radix);
}
else
{