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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
113 changed files with 1780 additions and 819 deletions

View file

@ -27,7 +27,8 @@ namespace CalculatorApp::ViewModel::HistoryResourceKeys
}
HistoryViewModel::HistoryViewModel(_In_ CalculationManager::CalculatorManager* calculatorManager)
: m_calculatorManager(calculatorManager), m_localizedHistoryCleared(nullptr)
: m_calculatorManager(calculatorManager)
, m_localizedHistoryCleared(nullptr)
{
AreHistoryShortcutsEnabled = true;
@ -69,8 +70,11 @@ void HistoryViewModel::ReloadHistory(_In_ ViewMode currentMode)
localizer.LocalizeDisplayValue(&expression);
localizer.LocalizeDisplayValue(&result);
auto item = ref new HistoryItemViewModel(ref new Platform::String(expression.c_str()), ref new Platform::String(result.c_str()),
(*ritr)->historyItemVector.spTokens, (*ritr)->historyItemVector.spCommands);
auto item = ref new HistoryItemViewModel(
ref new Platform::String(expression.c_str()),
ref new Platform::String(result.c_str()),
(*ritr)->historyItemVector.spTokens,
(*ritr)->historyItemVector.spCommands);
historyListVM->Append(item);
}
}
@ -87,8 +91,11 @@ void HistoryViewModel::OnHistoryItemAdded(_In_ unsigned int addedItemIndex)
wstring result = newItem->historyItemVector.result;
localizer.LocalizeDisplayValue(&expression);
localizer.LocalizeDisplayValue(&result);
auto item = ref new HistoryItemViewModel(ref new Platform::String(expression.c_str()), ref new Platform::String(result.c_str()),
newItem->historyItemVector.spTokens, newItem->historyItemVector.spCommands);
auto item = ref new HistoryItemViewModel(
ref new Platform::String(expression.c_str()),
ref new Platform::String(result.c_str()),
newItem->historyItemVector.spTokens,
newItem->historyItemVector.spCommands);
// check if we have not hit the max items
if (Items->Size >= m_calculatorManager->MaxHistorySize())
@ -310,8 +317,8 @@ Platform::String ^ HistoryViewModel::SerializeHistoryItem(_In_ std::shared_ptr<C
return CryptographicBuffer::EncodeToBase64String(buffer);
}
CalculationManager::HISTORYITEM HistoryViewModel::DeserializeHistoryItem(_In_ Platform::String ^ historyItemKey,
_In_ ApplicationDataContainer ^ historyContainer)
CalculationManager::HISTORYITEM
HistoryViewModel::DeserializeHistoryItem(_In_ Platform::String ^ historyItemKey, _In_ ApplicationDataContainer ^ historyContainer)
{
CalculationManager::HISTORYITEM historyItem;
if (historyContainer->Values->HasKey(historyItemKey))
@ -352,8 +359,9 @@ CalculationManager::HISTORYITEM HistoryViewModel::DeserializeHistoryItem(_In_ Pl
bool HistoryViewModel::IsValid(_In_ CalculationManager::HISTORYITEM item)
{
return (!item.historyItemVector.expression.empty() && !item.historyItemVector.result.empty() && (bool)item.historyItemVector.spCommands
&& (bool)item.historyItemVector.spTokens);
return (
!item.historyItemVector.expression.empty() && !item.historyItemVector.result.empty() && (bool)item.historyItemVector.spCommands
&& (bool)item.historyItemVector.spTokens);
}
void HistoryViewModel::UpdateItemSize()