Fix the project code style, as it is not consistent. (#236)
Fixes #202 This PR fixes code style for the project files. The Problem Different files in the project use different code style. That is not consistent and leads to harder maintenance of the project. Description of the changes: Have investigated and determined the most used code style across the given codebase Have configured IDE and applied code style to all project files. Have crafted clang-formatter config. see https://clang.llvm.org/docs/ClangFormat.html https://clang.llvm.org/docs/ClangFormatStyleOptions.html Some cases were fixed manually How changes were validated: manual/ad-hoc testing, automated testing All tests pass as before because these are only code style changes. Additional Please review, and let me know if I have any mistake in the code style. In case of any mistake, I will change the configuration and re-apply it to the project.
This commit is contained in:
		
				
					committed by
					
						 Daniel Belcher
						Daniel Belcher
					
				
			
			
				
	
			
			
			
						parent
						
							c77f1de84c
						
					
				
				
					commit
					2826d37056
				
			| @@ -31,13 +31,12 @@ using namespace CalculatorApp::Common; | ||||
|  | ||||
| DEPENDENCY_PROPERTY_INITIALIZATION(NumberPad, ButtonStyle); | ||||
|  | ||||
| NumberPad::NumberPad() : | ||||
|     m_isErrorVisualState(false) | ||||
| NumberPad::NumberPad() : m_isErrorVisualState(false) | ||||
| { | ||||
|     InitializeComponent(); | ||||
|  | ||||
|     const auto& localizationSettings = LocalizationSettings::GetInstance(); | ||||
|      | ||||
|  | ||||
|     this->DecimalSeparatorButton->Content = localizationSettings.GetDecimalSeparator(); | ||||
|     this->Num0Button->Content = localizationSettings.GetDigitSymbolFromEnUsDigit('0'); | ||||
|     this->Num1Button->Content = localizationSettings.GetDigitSymbolFromEnUsDigit('1'); | ||||
| @@ -64,7 +63,7 @@ void NumberPad::ProgModeRadixChange() | ||||
|     Num8Button->IsEnabled = true; | ||||
|     Num9Button->IsEnabled = true; | ||||
|  | ||||
|     auto vm = safe_cast<StandardCalculatorViewModel^>(this->DataContext); | ||||
|     auto vm = safe_cast<StandardCalculatorViewModel ^>(this->DataContext); | ||||
|     RADIX_TYPE radixType = vm->GetCurrentRadixType(); | ||||
|  | ||||
|     if (radixType == RADIX_TYPE::BIN_RADIX) | ||||
| @@ -95,7 +94,7 @@ void NumberPad::IsErrorVisualState::set(bool value) | ||||
|     if (m_isErrorVisualState != value) | ||||
|     { | ||||
|         m_isErrorVisualState = value; | ||||
|         String^ newState = m_isErrorVisualState ? L"ErrorLayout" : L"NoErrorLayout"; | ||||
|         String ^ newState = m_isErrorVisualState ? L"ErrorLayout" : L"NoErrorLayout"; | ||||
|         VisualStateManager::GoToState(this, newState, false); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user