Secondary formatting changes (#489)

Description of the changes:
Adjusted some of the values in .clang-format
Add clang-format-all.ps1
Fix path to .clang-format in Calculator.sln

How changes were validated:
Manual.
This commit is contained in:
Daniel Belcher
2019-05-02 16:48:33 -07:00
committed by GitHub
parent 2826d37056
commit 9f01c8168b
113 changed files with 1780 additions and 819 deletions

View File

@@ -54,8 +54,12 @@ namespace CalculatorEngineTests
class CCalcEngine
{
public:
CCalcEngine(bool fPrecedence, bool fIntegerMode, CalculationManager::IResourceProvider* const pResourceProvider, __in_opt ICalcDisplay* pCalcDisplay,
__in_opt std::shared_ptr<IHistoryDisplay> pHistoryDisplay);
CCalcEngine(
bool fPrecedence,
bool fIntegerMode,
CalculationManager::IResourceProvider* const pResourceProvider,
__in_opt ICalcDisplay* pCalcDisplay,
__in_opt std::shared_ptr<IHistoryDisplay> pHistoryDisplay);
void ProcessCommand(OpCode wID);
void DisplayError(uint32_t nError);
std::unique_ptr<CalcEngine::Rational> PersistedMemObject();

View File

@@ -13,7 +13,9 @@ namespace CalcEngine
class CalcNumSec
{
public:
CalcNumSec() : value(), m_isNegative(false)
CalcNumSec()
: value()
, m_isNegative(false)
{
}
@@ -41,11 +43,18 @@ namespace CalcEngine
class CalcInput
{
public:
CalcInput() : CalcInput(L'.')
CalcInput()
: CalcInput(L'.')
{
}
CalcInput(wchar_t decSymbol) : m_hasExponent(false), m_hasDecimal(false), m_decPtIndex(0), m_decSymbol(decSymbol), m_base(), m_exponent()
CalcInput(wchar_t decSymbol)
: m_hasExponent(false)
, m_hasDecimal(false)
, m_decPtIndex(0)
, m_decSymbol(decSymbol)
, m_base()
, m_exponent()
{
}

View File

@@ -12,8 +12,9 @@ class ICalcDisplay
public:
virtual void SetPrimaryDisplay(const std::wstring& pszText, bool isError) = 0;
virtual void SetIsInError(bool isInError) = 0;
virtual void SetExpressionDisplay(_Inout_ std::shared_ptr<CalculatorVector<std::pair<std::wstring, int>>> const& tokens,
_Inout_ std::shared_ptr<CalculatorVector<std::shared_ptr<IExpressionCommand>>> const& commands) = 0;
virtual void SetExpressionDisplay(
_Inout_ std::shared_ptr<CalculatorVector<std::pair<std::wstring, int>>> const& tokens,
_Inout_ std::shared_ptr<CalculatorVector<std::shared_ptr<IExpressionCommand>>> const& commands) = 0;
virtual void SetParenthesisNumber(_In_ unsigned int count) = 0;
virtual void OnNoRightParenAdded() = 0;
virtual void MaxDigitsReached() = 0; // not an error but still need to inform UI layer.

View File

@@ -8,7 +8,8 @@ class IHistoryDisplay
{
public:
virtual ~IHistoryDisplay(){};
virtual unsigned int AddToHistory(_In_ std::shared_ptr<CalculatorVector<std::pair<std::wstring, int>>> const& tokens,
_In_ std::shared_ptr<CalculatorVector<std::shared_ptr<IExpressionCommand>>> const& commands,
_In_ std::wstring_view result) = 0;
virtual unsigned int AddToHistory(
_In_ std::shared_ptr<CalculatorVector<std::pair<std::wstring, int>>> const& tokens,
_In_ std::shared_ptr<CalculatorVector<std::shared_ptr<IExpressionCommand>>> const& commands,
_In_ std::wstring_view result) = 0;
};