Updating comments per the C++ core guidelines and removing trailing whitespace (#194)

Fixed comments that were inconsistent with the style guidelines described in C++ core guidelines and the modern C++/WinRT language projections and removed trailing whitespace.

Inserted a space after the beginning of the comment so the text wasn't touching the // on all occurrences.

Removed all occurrences of trailing whitespace
This commit is contained in:
Will
2019-03-15 02:30:07 -04:00
committed by Howard Wolosky
parent 62317fd63b
commit 1113ff4b86
82 changed files with 509 additions and 510 deletions

View File

@@ -45,7 +45,7 @@
// Key IDs:
// These id's must be consecutive from IDC_FIRSTCONTROL to IDC_LASTCONTROL.
// These id's must be consecutive from IDC_FIRSTCONTROL to IDC_LASTCONTROL.
// The actual values don't matter but the order and sequence are very important.
// Also, the order of the controls must match the order of the control names
// in the string table.
@@ -97,7 +97,7 @@
#define IDC_FAC 113
#define IDC_REC 114
#define IDC_DMS 115
#define IDC_CUBEROOT 116 //x ^ 1/3
#define IDC_CUBEROOT 116 // x ^ 1/3
#define IDC_POW10 117 // 10 ^ x
#define IDC_PERCENT 118
#define IDC_UNARYLAST IDC_PERCENT

View File

@@ -85,7 +85,7 @@ private:
// if it hasn't yet been computed
bool m_bChangeOp; /* Flag for changing operation. */
bool m_bRecord; // Global mode: recording or displaying
bool m_bSetCalcState; //Flag for setting the engine result state
bool m_bSetCalcState; // Flag for setting the engine result state
CalcEngine::CalcInput m_input; // Global calc input object for decimal strings
eNUMOBJ_FMT m_nFE; /* Scientific notation conversion flag. */
CalcEngine::Rational m_maxTrigonometricNum;

View File

@@ -6,7 +6,7 @@
#include "Rational.h"
// Space to hold enough digits for a quadword binary number (64) plus digit separator strings for that number (20)
constexpr int MAX_STRLEN = 84;
constexpr int MAX_STRLEN = 84;
namespace CalcEngine
{

View File

@@ -128,7 +128,7 @@
#define SIDS_NFACTORIAL L"33"
#define SIDS_RECIPROCAL L"34"
#define SIDS_DMS L"35"
#define SIDS_CUBEROOT L"36"
#define SIDS_CUBEROOT L"36"
#define SIDS_POWTEN L"37"
#define SIDS_PERCENT L"38"
#define SIDS_SCIENTIFIC_NOTATION L"39"
@@ -200,7 +200,7 @@
#define SIDS_NOMEM L"105"
#define SIDS_TOOMANY L"106"
#define SIDS_OVERFLOW L"107"
#define SIDS_NORESULT L"108"
#define SIDS_NORESULT L"108"
#define SIDS_INSUFFICIENT_DATA L"109"
// 110 is skipped by CSTRINGSENGMAX
#define SIDS_ERR_UNK_CH L"111"
@@ -214,7 +214,7 @@
#define SIDS_ERR_INPUT_OVERFLOW L"119"
#define SIDS_ERR_OUTPUT_OVERFLOW L"120"
__declspec(selectany) std::wstring g_sids[] =
__declspec(selectany) std::wstring g_sids[] =
{
std::wstring(SIDS_PLUS_MINUS),
std::wstring(SIDS_C),
@@ -252,7 +252,7 @@ __declspec(selectany) std::wstring g_sids[] =
std::wstring(SIDS_NFACTORIAL),
std::wstring(SIDS_RECIPROCAL),
std::wstring(SIDS_DMS),
std::wstring(SIDS_CUBEROOT),
std::wstring(SIDS_CUBEROOT),
std::wstring(SIDS_POWTEN),
std::wstring(SIDS_PERCENT),
std::wstring(SIDS_SCIENTIFIC_NOTATION),
@@ -324,7 +324,7 @@ __declspec(selectany) std::wstring g_sids[] =
std::wstring(SIDS_NOMEM),
std::wstring(SIDS_TOOMANY),
std::wstring(SIDS_OVERFLOW),
std::wstring(SIDS_NORESULT),
std::wstring(SIDS_NORESULT),
std::wstring(SIDS_INSUFFICIENT_DATA),
std::wstring(SIDS_ERR_UNK_CH),
std::wstring(SIDS_ERR_UNK_FN),

View File

@@ -10,8 +10,8 @@
// maximum depth you can get by precedence. It is just an array's size limit.
static constexpr size_t MAXPRECDEPTH = 25;
// Helper class really a internal class to CCalcEngine, to accumulate each history line of text by collecting the
// operands, operator, unary operator etc. Since it is a separate entity, it can be unit tested on its own but does
// Helper class really a internal class to CCalcEngine, to accumulate each history line of text by collecting the
// operands, operator, unary operator etc. Since it is a separate entity, it can be unit tested on its own but does
// rely on CCalcEngine calling it in appropriate order.
class CHistoryCollector {
public:
@@ -39,13 +39,13 @@ private:
ICalcDisplay *m_pCalcDisplay;
int m_iCurLineHistStart; // index of the beginning of the current equation
// a sort of state, set to the index before 2 after 2 in the expression 2 + 3 say. Useful for auto correct portion of history and for
// a sort of state, set to the index before 2 after 2 in the expression 2 + 3 say. Useful for auto correct portion of history and for
// attaching the unary op around the last operand
int m_lastOpStartIndex; // index of the beginning of the last operand added to the history
int m_lastBinOpStartIndex; // index of the beginning of the last binary operator added to the history
std::array<int, MAXPRECDEPTH> m_operandIndices; // Stack of index of opnd's beginning for each '('. A parallel array to m_hnoParNum, but abstracted independently of that
int m_curOperandIndex; // Stack index for the above stack
bool m_bLastOpndBrace; // iff the last opnd in history is already braced so we can avoid putting another one for unary operator
bool m_bLastOpndBrace; // iff the last opnd in history is already braced so we can avoid putting another one for unary operator
wchar_t m_decimalSymbol;
std::shared_ptr<CalculatorVector <std::pair<std::wstring, int>>> m_spTokens;
std::shared_ptr<CalculatorVector<std::shared_ptr<IExpressionCommand>>> m_spCommands;