This commit is contained in:
Josh Soref
2019-03-07 13:27:13 -05:00
committed by Matt Cooley
parent 07f4cc1926
commit 84941c698e
29 changed files with 60 additions and 60 deletions

View File

@@ -136,7 +136,7 @@ void CHistoryCollector::ChangeLastBinOp(int nOpCode, bool fPrecInvToHigher)
TruncateEquationSzFromIch(m_lastBinOpStartIndex);
if (fPrecInvToHigher)
{
EnclosePrecInvertionBrackets();
EnclosePrecInversionBrackets();
}
AddBinOpToHistory(nOpCode);
}
@@ -180,7 +180,7 @@ void CHistoryCollector::AddCloseBraceToHistory()
m_bLastOpndBrace = true;
}
void CHistoryCollector::EnclosePrecInvertionBrackets()
void CHistoryCollector::EnclosePrecInversionBrackets()
{
// Top of the Opnd starts index or 0 is nothing is in top
int ichStart = (m_curOperandIndex > 0) ? m_operandIndices[m_curOperandIndex - 1] : 0;
@@ -401,9 +401,9 @@ int CHistoryCollector::AddCommand(_In_ const std::shared_ptr<IExpressionCommand>
throw(CALC_E_OUTOFMEMORY);
}
unsigned int nCommmands = 0;
m_spCommands->GetSize(&nCommmands);
return nCommmands - 1;
unsigned int nCommands = 0;
m_spCommands->GetSize(&nCommands);
return nCommands - 1;
}
//To Update the operands in the Expression according to the current Radix

View File

@@ -271,7 +271,7 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
// 1 + (2 Or 3)
if (ni <= nx)
{
m_HistoryCollector.EnclosePrecInvertionBrackets();
m_HistoryCollector.EnclosePrecInversionBrackets();
}
m_HistoryCollector.PopLastOpndStart();
goto DoPrecedenceCheckAgain;
@@ -507,7 +507,7 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
nx = NPrecedenceOfOp(m_nOpCode);
if (ni <= nx)
{
m_HistoryCollector.EnclosePrecInvertionBrackets();
m_HistoryCollector.EnclosePrecInversionBrackets();
}
m_HistoryCollector.PopLastOpndStart();
@@ -600,7 +600,7 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
nx = NPrecedenceOfOp(m_nOpCode);
if (ni <= nx)
{
m_HistoryCollector.EnclosePrecInvertionBrackets();
m_HistoryCollector.EnclosePrecInversionBrackets();
}
m_HistoryCollector.PopLastOpndStart();

View File

@@ -98,7 +98,7 @@ namespace CalculationManager
}
/// <summary>
/// Callback from the CalculatorControll
/// Callback from the CalculatorControl
/// Passed in string representations of memorized numbers get passed to the client
/// </summary>
/// <param name="memorizedNumber">vector containing wstring values of memorized numbers</param>
@@ -429,7 +429,7 @@ namespace CalculationManager
*commandItr <= MEMORY_COMMAND_TO_UNSIGNED_CHAR(MemoryCommand::MemorizedNumberClearAll))
{
//MemoryCommands(which have values above 255) are pushed on m_savedCommands upon casting to unsigned char.
//SerializeCommands uses m_savedCommands, which is then used in DeSerializeCommnds.
//SerializeCommands uses m_savedCommands, which is then used in DeSerializeCommands.
//Hence, a simple cast to MemoryCommand is not sufficient.
MemoryCommand memoryCommand = static_cast<MemoryCommand>(*commandItr + UCHAR_MAX + 1);
unsigned int indexOfMemory = 0;
@@ -505,7 +505,7 @@ namespace CalculationManager
/// Recall the memorized number.
/// The memorized number gets loaded to the primary display
/// </summary>
/// <param name="indexOfMemeory">Index of the target memory</param>
/// <param name="indexOfMemory">Index of the target memory</param>
void CalculatorManager::MemorizedNumberLoad(_In_ unsigned int indexOfMemory)
{
SaveMemoryCommand(MemoryCommand::MemorizedNumberLoad, indexOfMemory);
@@ -521,7 +521,7 @@ namespace CalculationManager
/// It adds primary display value to the selected memory
/// Notify the client with new the new memorize value vector
/// </summary>
/// <param name="indexOfMemeory">Index of the target memory</param>
/// <param name="indexOfMemory">Index of the target memory</param>
void CalculatorManager::MemorizedNumberAdd(_In_ unsigned int indexOfMemory)
{
SaveMemoryCommand(MemoryCommand::MemorizedNumberAdd, indexOfMemory);
@@ -559,7 +559,7 @@ namespace CalculationManager
/// It adds primary display value to the selected memory
/// Notify the client with new the new memorize value vector
/// </summary>
/// <param name="indexOfMemeory">Index of the target memory</param>
/// <param name="indexOfMemory">Index of the target memory</param>
void CalculatorManager::MemorizedNumberSubtract(_In_ unsigned int indexOfMemory)
{
SaveMemoryCommand(MemoryCommand::MemorizedNumberSubtract, indexOfMemory);
@@ -603,7 +603,7 @@ namespace CalculationManager
/// Helper function that selects a memory from the vector and set it to CCalcEngine
/// Saved RAT number needs to be copied and passed in, as CCalcEngine destroyed the passed in RAT
/// </summary>
/// <param name="indexOfMemeory">Index of the target memory</param>
/// <param name="indexOfMemory">Index of the target memory</param>
void CalculatorManager::MemorizedNumberSelect(_In_ unsigned int indexOfMemory)
{
if (!(m_currentCalculatorEngine->FInErrorState()))
@@ -617,7 +617,7 @@ namespace CalculationManager
/// Helper function that needs to be executed when memory is modified
/// When memory is modified, destroy the old RAT and put the new RAT in vector
/// </summary>
/// <param name="indexOfMemeory">Index of the target memory</param>
/// <param name="indexOfMemory">Index of the target memory</param>
void CalculatorManager::MemorizedNumberChanged(_In_ unsigned int indexOfMemory)
{
if (!(m_currentCalculatorEngine->FInErrorState()))

View File

@@ -26,7 +26,7 @@ public:
void AddCloseBraceToHistory();
void PushLastOpndStart(int ichOpndStart = -1);
void PopLastOpndStart();
void EnclosePrecInvertionBrackets();
void EnclosePrecInversionBrackets();
bool FOpndAddedToHistory();
void CompleteHistoryLine(std::wstring_view numStr);
void ClearHistoryLine(std::wstring_view errStr);

View File

@@ -183,7 +183,7 @@ void divrat( PRAT *pa, PRAT b, int32_t precision)
// RETURN: None, changes first pointer.
//
// DESCRIPTION: Does the rational equivalent of *pa += b.
// Assumes base is internal througought.
// Assumes base is internal throughout.
//
//-----------------------------------------------------------------------------
@@ -204,7 +204,7 @@ void subrat( PRAT *pa, PRAT b, int32_t precision)
// RETURN: None, changes first pointer.
//
// DESCRIPTION: Does the rational equivalent of *pa += b.
// Assumes base is internal througought.
// Assumes base is internal throughout.
//
//-----------------------------------------------------------------------------