Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #155 from Parlane/codestyle_fixes

Fixes spacing for "for", "while", "switch" and "if"
commit ede46556d9b5043113e19359fee97eb09f9c872c 2 parents 52ed102 + 31cfc73
Pierre Bourdon authored

Showing 189 changed files with 1,250 additions and 1,159 deletions. Show Diff Stats Hide Diff Stats

  1. 2  Source/Core/AudioCommon/DPL2Decoder.cpp
  2. 6  Source/Core/AudioCommon/Mixer.cpp
  3. 2  Source/Core/AudioCommon/OpenALStream.cpp
  4. 2  Source/Core/AudioCommon/PulseAudioStream.cpp
  5. 6  Source/Core/Common/ArmEmitter.cpp
  6. 4  Source/Core/Common/ArmEmitter.h
  7. 18  Source/Core/Common/CDUtils.cpp
  8. 2  Source/Core/Common/ChunkFile.h
  9. 10  Source/Core/Common/CommonFuncs.h
  10. 2  Source/Core/Common/Crypto/ec.cpp
  11. 22  Source/Core/Common/ExtendedTrace.cpp
  12. 6  Source/Core/Common/FileSearch.cpp
  13. 44  Source/Core/Common/Hash.cpp
  14. 7  Source/Core/Common/IniFile.cpp
  15. 4  Source/Core/Common/LinearDiskCache.h
  16. 2  Source/Core/Common/MathUtil.cpp
  17. 2  Source/Core/Common/MsgHandler.cpp
  18. 4  Source/Core/Common/SettingsHandler.cpp
  19. 10  Source/Core/Common/StringUtil.cpp
  20. 2  Source/Core/Common/Timer.cpp
  21. 148  Source/Core/Common/x64ABI.cpp
  22. 2  Source/Core/Common/x64Analyzer.cpp
  23. 30  Source/Core/Common/x64Emitter.cpp
  24. 6  Source/Core/Core/ActionReplay.cpp
  25. 2  Source/Core/Core/Boot/Boot.cpp
  26. 4  Source/Core/Core/Boot/Boot_BS2Emu.cpp
  27. 2  Source/Core/Core/Boot/Boot_WiiWAD.cpp
  28. 8  Source/Core/Core/Core.cpp
  29. 12  Source/Core/Core/CoreTiming.cpp
  30. 16  Source/Core/Core/DSP/DSPAssembler.cpp
  31. 6  Source/Core/Core/DSP/DSPCodeUtil.cpp
  32. 10  Source/Core/Core/DSP/DSPCore.cpp
  33. 8  Source/Core/Core/DSP/DSPEmitter.cpp
  34. 6  Source/Core/Core/DSP/DSPIntExtOps.cpp
  35. 6  Source/Core/Core/DSP/DspIntArithmetic.cpp
  36. 2  Source/Core/Core/DSP/Jit/DSPJitBranch.cpp
  37. 72  Source/Core/Core/DSP/Jit/DSPJitRegCache.cpp
  38. 4  Source/Core/Core/DSP/Jit/DSPJitUtil.cpp
  39. 8  Source/Core/Core/Debugger/PPCDebugInterface.cpp
  40. 2  Source/Core/Core/FifoPlayer/FifoPlaybackAnalyzer.cpp
  41. 2  Source/Core/Core/HLE/HLE_Misc.cpp
  42. 20  Source/Core/Core/HLE/HLE_OS.cpp
  43. 2  Source/Core/Core/HW/DSPHLE/DSPHLE.cpp
  44. 6  Source/Core/Core/HW/DSPHLE/UCodes/UCode_Zelda_Synth.cpp
  45. 2  Source/Core/Core/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp
  46. 2  Source/Core/Core/HW/DSPLLE/DSPLLE.cpp
  47. 20  Source/Core/Core/HW/DVDInterface.cpp
  48. 2  Source/Core/Core/HW/EXI.cpp
  49. 8  Source/Core/Core/HW/EXI_Channel.cpp
  50. 8  Source/Core/Core/HW/EXI_DeviceAD16.cpp
  51. 6  Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp
  52. 18  Source/Core/Core/HW/GCMemcard.cpp
  53. 14  Source/Core/Core/HW/MemmapFunctions.cpp
  54. 10  Source/Core/Core/HW/SI.cpp
  55. 2  Source/Core/Core/HW/SI_Device.cpp
  56. 4  Source/Core/Core/HW/SI_DeviceAMBaseboard.cpp
  57. 4  Source/Core/Core/HW/SI_DeviceDanceMat.cpp
  58. 4  Source/Core/Core/HW/SI_DeviceGCController.cpp
  59. 4  Source/Core/Core/HW/SI_DeviceGCSteeringWheel.cpp
  60. 2  Source/Core/Core/HW/Sram.cpp
  61. 6  Source/Core/Core/HW/VideoInterface.cpp
  62. 34  Source/Core/Core/HW/WiimoteEmu/EmuSubroutines.cpp
  63. 4  Source/Core/Core/HW/WiimoteEmu/Encryption.cpp
  64. 3  Source/Core/Core/HW/WiimoteEmu/Speaker.cpp
  65. 4  Source/Core/Core/HW/WiimoteEmu/WiimoteEmu.cpp
  66. 2  Source/Core/Core/HW/WiimoteReal/IONix.cpp
  67. 4  Source/Core/Core/HW/WiimoteReal/IOdarwin.mm
  68. 33  Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp
  69. 21  Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_DI.cpp
  70. 4  Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp
  71. 16  Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_fs.cpp
  72. 21  Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.cpp
  73. 4  Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.h
  74. 4  Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp
  75. 2  Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_stm.h
  76. 4  Source/Core/Core/IPC_HLE/WII_IPC_HLE_WiiMote.cpp
  77. 31  Source/Core/Core/IPC_HLE/WII_Socket.cpp
  78. 127  Source/Core/Core/Movie.cpp
  79. 2  Source/Core/Core/NetPlayServer.cpp
  80. 14  Source/Core/Core/PowerPC/GDBStub.cpp
  81. 20  Source/Core/Core/PowerPC/Interpreter/Interpreter_Integer.cpp
  82. 2  Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStorePaired.cpp
  83. 2  Source/Core/Core/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp
  84. 2  Source/Core/Core/PowerPC/Jit64/Jit_Branch.cpp
  85. 6  Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp
  86. 20  Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
  87. 2  Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp
  88. 16  Source/Core/Core/PowerPC/JitArm32/Jit.cpp
  89. 4  Source/Core/Core/PowerPC/JitArm32/JitArm_Branch.cpp
  90. 2  Source/Core/Core/PowerPC/JitArm32/JitArm_FPUtils.h
  91. 10  Source/Core/Core/PowerPC/JitArm32/JitArm_Integer.cpp
  92. 8  Source/Core/Core/PowerPC/JitArm32/JitArm_LoadStore.cpp
  93. 4  Source/Core/Core/PowerPC/JitArm32/JitArm_LoadStoreFloating.cpp
  94. 2  Source/Core/Core/PowerPC/JitArm32/JitArm_SystemRegisters.cpp
  95. 14  Source/Core/Core/PowerPC/JitArm32/JitFPRCache.cpp
  96. 23  Source/Core/Core/PowerPC/JitArm32/JitRegCache.cpp
  97. 2  Source/Core/Core/PowerPC/JitArmIL/IR_Arm.cpp
  98. 14  Source/Core/Core/PowerPC/JitArmIL/JitIL.cpp
  99. 2  Source/Core/Core/PowerPC/JitArmIL/JitIL_Branch.cpp
  100. 2  Source/Core/Core/PowerPC/JitILCommon/JitILBase_Branch.cpp
  101. 2  Source/Core/Core/PowerPC/JitILCommon/JitILBase_LoadStore.cpp
  102. 4  Source/Core/Core/PowerPC/JitInterface.cpp
  103. 2  Source/Core/Core/PowerPC/PPCSymbolDB.cpp
  104. 4  Source/Core/Core/PowerPC/PPCTables.cpp
  105. 6  Source/Core/DiscIO/BannerLoaderWii.cpp
  106. 2  Source/Core/DiscIO/DriveBlob.cpp
  107. 4  Source/Core/DiscIO/NANDContentLoader.cpp
  108. 2  Source/Core/DiscIO/VolumeCommon.cpp
  109. 58  Source/Core/DiscIO/VolumeDirectory.cpp
  110. 4  Source/Core/DiscIO/VolumeWad.cpp
  111. 28  Source/Core/DiscIO/WbfsBlob.cpp
  112. 4  Source/Core/DiscIO/WiiWad.cpp
  113. 6  Source/Core/DolphinWX/ConfigMain.cpp
  114. 4  Source/Core/DolphinWX/Debugger/CodeView.cpp
  115. 8  Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp
  116. 7  Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp
  117. 20  Source/Core/DolphinWX/Debugger/MemoryWindow.cpp
  118. 22  Source/Core/DolphinWX/Frame.cpp
  119. 14  Source/Core/DolphinWX/FrameAui.cpp
  120. 30  Source/Core/DolphinWX/FrameTools.cpp
  121. 4  Source/Core/DolphinWX/GLInterface/AGL.cpp
  122. 10  Source/Core/DolphinWX/GLInterface/EGL.cpp
  123. 2  Source/Core/DolphinWX/GLInterface/X11_Util.cpp
  124. 26  Source/Core/DolphinWX/GameListCtrl.cpp
  125. 6  Source/Core/DolphinWX/HotkeyDlg.cpp
  126. 32  Source/Core/DolphinWX/ISOProperties.cpp
  127. 6  Source/Core/DolphinWX/Main.cpp
  128. 4  Source/Core/DolphinWX/MainNoGUI.cpp
  129. 10  Source/Core/DolphinWX/MemcardManager.cpp
  130. 8  Source/Core/DolphinWX/MemoryCards/WiiSaveCrypted.cpp
  131. 2  Source/Core/DolphinWX/NetWindow.cpp
  132. 227  Source/Core/DolphinWX/TASInputDlg.cpp
  133. 2  Source/Core/DolphinWX/WiimoteConfigDiag.cpp
  134. 9  Source/Core/DolphinWX/X11Utils.cpp
  135. 14  Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
  136. 4  Source/Core/InputCommon/ControllerInterface/ForceFeedback/OSX/DirectInputAdapter.h
  137. 13  Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
  138. 2  Source/Core/InputCommon/UDPWiimote.cpp
  139. 16  Source/Core/VideoBackends/D3D/D3DBase.cpp
  140. 12  Source/Core/VideoBackends/D3D/D3DUtil.cpp
  141. 4  Source/Core/VideoBackends/D3D/GfxState.cpp
  142. 4  Source/Core/VideoBackends/D3D/PixelShaderCache.cpp
  143. 18  Source/Core/VideoBackends/D3D/Render.cpp
  144. 2  Source/Core/VideoBackends/OGL/FramebufferManager.cpp
  145. 12  Source/Core/VideoBackends/OGL/GLUtil.cpp
  146. 6  Source/Core/VideoBackends/OGL/PostProcessing.cpp
  147. 22  Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
  148. 6  Source/Core/VideoBackends/OGL/ProgramShaderCache.h
  149. 18  Source/Core/VideoBackends/OGL/RasterFont.cpp
  150. 56  Source/Core/VideoBackends/OGL/Render.cpp
  151. 18  Source/Core/VideoBackends/OGL/StreamBuffer.cpp
  152. 19  Source/Core/VideoBackends/OGL/TextureCache.cpp
  153. 6  Source/Core/VideoBackends/OGL/VertexManager.cpp
  154. 18  Source/Core/VideoBackends/Software/Clipper.cpp
  155. 2  Source/Core/VideoBackends/Software/DebugUtil.cpp
  156. 2  Source/Core/VideoBackends/Software/EfbCopy.cpp
  157. 2  Source/Core/VideoBackends/Software/EfbInterface.cpp
  158. 4  Source/Core/VideoBackends/Software/OpcodeDecoder.cpp
  159. 38  Source/Core/VideoBackends/Software/Rasterizer.cpp
  160. 2  Source/Core/VideoBackends/Software/SWRenderer.cpp
  161. 2  Source/Core/VideoBackends/Software/SWmain.cpp
  162. 2  Source/Core/VideoBackends/Software/SetupUnit.cpp
  163. 12  Source/Core/VideoBackends/Software/Tev.cpp
  164. 12  Source/Core/VideoBackends/Software/TextureEncoder.cpp
  165. 2  Source/Core/VideoCommon/AVIDump.cpp
  166. 8  Source/Core/VideoCommon/BPMemory.h
  167. 50  Source/Core/VideoCommon/BPStructs.cpp
  168. 11  Source/Core/VideoCommon/CommandProcessor.cpp
  169. 4  Source/Core/VideoCommon/Debugger.cpp
  170. 17  Source/Core/VideoCommon/DriverDetails.cpp
  171. 4  Source/Core/VideoCommon/EmuWindow.cpp
  172. 4  Source/Core/VideoCommon/Fifo.cpp
  173. 16  Source/Core/VideoCommon/IndexGenerator.cpp
  174. 6  Source/Core/VideoCommon/LightingShaderGen.h
  175. 6  Source/Core/VideoCommon/MainBase.cpp
  176. 2  Source/Core/VideoCommon/OnScreenDisplay.cpp
  177. 84  Source/Core/VideoCommon/PixelShaderGen.cpp
  178. 10  Source/Core/VideoCommon/PixelShaderManager.cpp
  179. 2  Source/Core/VideoCommon/RenderBase.cpp
  180. 34  Source/Core/VideoCommon/TextureCacheBase.cpp
  181. 2  Source/Core/VideoCommon/TextureConversionShader.cpp
  182. 12  Source/Core/VideoCommon/TextureDecoder_Generic.cpp
  183. 10  Source/Core/VideoCommon/TextureDecoder_x64.cpp
  184. 4  Source/Core/VideoCommon/VertexLoader.cpp
  185. 16  Source/Core/VideoCommon/VertexManagerBase.cpp
  186. 10  Source/Core/VideoCommon/VertexShaderGen.cpp
  187. 6  Source/Core/VideoCommon/VertexShaderManager.cpp
  188. 2  Source/DSPSpy/main_spy.cpp
  189. 12  Source/DSPTool/DSPTool.cpp
2  Source/Core/AudioCommon/DPL2Decoder.cpp
@@ -123,7 +123,7 @@ float* design_fir(unsigned int *n, float* fc, float opt)
123 123
 	float fc1;                               // Cutoff frequencies
124 124
 
125 125
 	// Sanity check
126  
-	if(*n==0) return nullptr;
  126
+	if (*n==0) return nullptr;
127 127
 	MathUtil::Clamp(&fc[0],float(0.001),float(1));
128 128
 
129 129
 	float *w=(float*)calloc(sizeof(float),*n);
6  Source/Core/AudioCommon/Mixer.cpp
@@ -48,8 +48,8 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples, bool consider_
48 48
 	float numLeft = ((indexW - indexR) & INDEX_MASK) / 2;
49 49
 	m_numLeftI = (numLeft + m_numLeftI*(CONTROL_AVG-1)) / CONTROL_AVG;
50 50
 	float offset = (m_numLeftI - LOW_WATERMARK) * CONTROL_FACTOR;
51  
-	if(offset > MAX_FREQ_SHIFT) offset = MAX_FREQ_SHIFT;
52  
-	if(offset < -MAX_FREQ_SHIFT) offset = -MAX_FREQ_SHIFT;
  51
+	if (offset > MAX_FREQ_SHIFT) offset = MAX_FREQ_SHIFT;
  52
+	if (offset < -MAX_FREQ_SHIFT) offset = -MAX_FREQ_SHIFT;
53 53
 
54 54
 	//render numleft sample pairs to samples[]
55 55
 	//advance indexR with sample position
@@ -65,7 +65,7 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples, bool consider_
65 65
 	static u32 frac = 0;
66 66
 	const u32 ratio = (u32)( 65536.0f * aid_sample_rate / (float)m_sampleRate );
67 67
 
68  
-	if(ratio > 0x10000)
  68
+	if (ratio > 0x10000)
69 69
 		ERROR_LOG(AUDIO, "ratio out of range");
70 70
 
71 71
 	for (; currentSample < numSamples*2 && ((indexW-indexR) & INDEX_MASK) > 2; currentSample+=2) {
2  Source/Core/AudioCommon/OpenALStream.cpp
@@ -105,7 +105,7 @@ void OpenALStream::Clear(bool mute)
105 105
 {
106 106
 	m_muted = mute;
107 107
 
108  
-	if(m_muted)
  108
+	if (m_muted)
109 109
 	{
110 110
 		soundTouch.clear();
111 111
 		alSourceStop(uiSource);
2  Source/Core/AudioCommon/PulseAudioStream.cpp
@@ -49,7 +49,7 @@ void PulseAudio::SoundLoop()
49 49
 		while (m_run_thread.load() && m_pa_connected == 1 && m_pa_error >= 0)
50 50
 			m_pa_error = pa_mainloop_iterate(m_pa_ml, 1, nullptr);
51 51
 
52  
-		if(m_pa_error < 0)
  52
+		if (m_pa_error < 0)
53 53
 			ERROR_LOG(AUDIO, "PulseAudio error: %s", pa_strerror(m_pa_error));
54 54
 
55 55
 		PulseShutdown();
6  Source/Core/Common/ArmEmitter.cpp
@@ -193,9 +193,9 @@ void ARMXEmitter::ORI2R(ARMReg rd, ARMReg rs, u32 val, ARMReg scratch)
193 193
 
194 194
 void ARMXEmitter::FlushLitPool()
195 195
 {
196  
-	for(LiteralPool& pool : currentLitPool) {
  196
+	for (LiteralPool& pool : currentLitPool) {
197 197
 		// Search for duplicates
198  
-		for(LiteralPool& old_pool : currentLitPool) {
  198
+		for (LiteralPool& old_pool : currentLitPool) {
199 199
 			if (old_pool.val == pool.val)
200 200
 				pool.loc = old_pool.loc;
201 201
 		}
@@ -242,7 +242,7 @@ void ARMXEmitter::MOVI2R(ARMReg reg, u32 val, bool optimize)
242 242
 		{
243 243
 			// Use MOVW+MOVT for ARMv7+
244 244
 			MOVW(reg, val & 0xFFFF);
245  
-			if(val & 0xFFFF0000)
  245
+			if (val & 0xFFFF0000)
246 246
 				MOVT(reg, val, true);
247 247
 		} else if (!TrySetValue_TwoOp(reg,val)) {
248 248
 			// Use literal pool for ARMv6.
4  Source/Core/Common/ArmEmitter.h
@@ -161,7 +161,7 @@ class Operand2
161 161
 
162 162
 	Operand2(ARMReg base, ShiftType type, u8 shift)// For IMM shifted register
163 163
 	{
164  
-		if(shift == 32) shift = 0;
  164
+		if (shift == 32) shift = 0;
165 165
 		switch (type)
166 166
 		{
167 167
 		case ST_LSL:
@@ -198,7 +198,7 @@ class Operand2
198 198
 	}
199 199
 	u32 GetData()
200 200
 	{
201  
-		switch(Type)
  201
+		switch (Type)
202 202
 		{
203 203
 		case TYPE_IMM:
204 204
 			return Imm12Mod(); // This'll need to be changed later
18  Source/Core/Common/CDUtils.cpp
@@ -73,11 +73,11 @@ bool is_cdrom(const TCHAR* drive)
73 73
 	std::vector<std::string> drives;
74 74
 
75 75
 	kern_result = IOMasterPort( MACH_PORT_NULL, &master_port );
76  
-	if( kern_result != KERN_SUCCESS )
  76
+	if (kern_result != KERN_SUCCESS)
77 77
 		return( drives );
78 78
 
79 79
 	classes_to_match = IOServiceMatching( kIOCDMediaClass );
80  
-	if( classes_to_match == nullptr )
  80
+	if (classes_to_match == nullptr)
81 81
 		return( drives );
82 82
 
83 83
 	CFDictionarySetValue( classes_to_match,
@@ -85,11 +85,11 @@ bool is_cdrom(const TCHAR* drive)
85 85
 
86 86
 	kern_result = IOServiceGetMatchingServices( master_port,
87 87
 		classes_to_match, &media_iterator );
88  
-	if( kern_result != KERN_SUCCESS)
  88
+	if (kern_result != KERN_SUCCESS)
89 89
 		return( drives );
90 90
 
91 91
 	next_media = IOIteratorNext( media_iterator );
92  
-	if( next_media != 0 )
  92
+	if (next_media != 0)
93 93
 	{
94 94
 		char psz_buf[0x32];
95 95
 		size_t dev_path_length;
@@ -101,7 +101,7 @@ bool is_cdrom(const TCHAR* drive)
101 101
 				IORegistryEntryCreateCFProperty( next_media,
102 102
 					CFSTR( kIOBSDNameKey ), kCFAllocatorDefault,
103 103
 					0 );
104  
-			if( str_bsd_path == nullptr )
  104
+			if (str_bsd_path == nullptr)
105 105
 			{
106 106
 				IOObjectRelease( next_media );
107 107
 				continue;
@@ -113,12 +113,12 @@ bool is_cdrom(const TCHAR* drive)
113 113
 			snprintf( psz_buf, sizeof(psz_buf), "%s%c", _PATH_DEV, 'r' );
114 114
 			dev_path_length = strlen( psz_buf );
115 115
 
116  
-			if( CFStringGetCString( (CFStringRef)str_bsd_path,
  116
+			if (CFStringGetCString( (CFStringRef)str_bsd_path,
117 117
 				(char*)&psz_buf + dev_path_length,
118 118
 				sizeof(psz_buf) - dev_path_length,
119 119
 				kCFStringEncodingASCII))
120 120
 			{
121  
-				if(psz_buf != nullptr)
  121
+				if (psz_buf != nullptr)
122 122
 				{
123 123
 					std::string str = psz_buf;
124 124
 					drives.push_back(str);
@@ -127,7 +127,7 @@ bool is_cdrom(const TCHAR* drive)
127 127
 			CFRelease( str_bsd_path );
128 128
 			IOObjectRelease( next_media );
129 129
 
130  
-		} while( ( next_media = IOIteratorNext( media_iterator ) ) != 0 );
  130
+		} while (( next_media = IOIteratorNext( media_iterator ) ) != 0);
131 131
 	}
132 132
 	IOObjectRelease( media_iterator );
133 133
 	return drives;
@@ -175,7 +175,7 @@ static bool is_cdrom(const std::string& drive, char *mnttype)
175 175
 	bool is_cd=false;
176 176
 	// If it does exist, verify that it is a cdrom/dvd drive
177 177
 	int cdfd = open(drive.c_str(), (O_RDONLY|O_NONBLOCK), 0);
178  
-	if ( cdfd >= 0 )
  178
+	if (cdfd >= 0)
179 179
 	{
180 180
 #ifdef __linux__
181 181
 		if (ioctl(cdfd, CDROM_GET_CAPABILITY, 0) != -1)
2  Source/Core/Common/ChunkFile.h
@@ -306,7 +306,7 @@ class PointerWrap
306 306
 
307 307
 	void DoVoid(void *data, u32 size)
308 308
 	{
309  
-		for(u32 i = 0; i != size; ++i)
  309
+		for (u32 i = 0; i != size; ++i)
310 310
 			DoByte(reinterpret_cast<u8*>(data)[i]);
311 311
 	}
312 312
 };
10  Source/Core/Common/CommonFuncs.h
@@ -35,8 +35,8 @@ struct ArraySizeImpl : public std::extent<T>
35 35
 	#define __GNUC_PREREQ(a, b) 0 
36 36
 #endif
37 37
 
38  
-#if (defined __GNUC__ && !__GNUC_PREREQ(4,9))  \
39  
-	&& !defined __SSSE3__ && !defined _M_GENERIC
  38
+#if (defined __GNUC__ && !__GNUC_PREREQ(4,9)) && \
  39
+    !defined __SSSE3__ && !defined _M_GENERIC
40 40
 #include <emmintrin.h>
41 41
 static __inline __m128i __attribute__((__always_inline__))
42 42
 _mm_shuffle_epi8(__m128i a, __m128i mask)
@@ -122,18 +122,18 @@ inline u64 _rotr64(u64 x, unsigned int shift){
122 122
 		// Retrieve the current thread-specific locale
123 123
 		locale_t old_locale = bIsPerThread ? _get_current_locale() : LC_GLOBAL_LOCALE;
124 124
 
125  
-		if(new_locale == LC_GLOBAL_LOCALE)
  125
+		if (new_locale == LC_GLOBAL_LOCALE)
126 126
 		{
127 127
 			// Restore the global locale
128 128
 			_configthreadlocale(_DISABLE_PER_THREAD_LOCALE);
129 129
 		}
130  
-		else if(new_locale != nullptr)
  130
+		else if (new_locale != nullptr)
131 131
 		{
132 132
 			// Configure the thread to set the locale only for this thread
133 133
 			_configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
134 134
 
135 135
 			// Set all locale categories
136  
-			for(int i = LC_MIN; i <= LC_MAX; i++)
  136
+			for (int i = LC_MIN; i <= LC_MAX; i++)
137 137
 				setlocale(i, new_locale->locinfo->lc_category[i].locale);
138 138
 		}
139 139
 
2  Source/Core/Common/Crypto/ec.cpp
@@ -318,7 +318,7 @@ static void silly_random(u8 * rndArea, u8 count)
318 318
 	u16 i;
319 319
 	srand((unsigned) (time(nullptr)));
320 320
 
321  
-	for(i=0;i<count;i++)
  321
+	for (i=0;i<count;i++)
322 322
 	{
323 323
 		rndArea[i]=rand();
324 324
 	}
22  Source/Core/Common/ExtendedTrace.cpp
@@ -34,7 +34,7 @@ void PCSTR2LPTSTR( PCSTR lpszIn, LPTSTR lpszOut )
34 34
 	ULONG index = 0;
35 35
 	PCSTR lpAct = lpszIn;
36 36
 
37  
-	for( ; ; lpAct++ )
  37
+	for ( ; ; lpAct++ )
38 38
 	{
39 39
 		lpszOut[index++] = (TCHAR)(*lpAct);
40 40
 		if ( *lpAct == 0 )
@@ -196,7 +196,7 @@ static BOOL GetFunctionInfoFromAddresses( ULONG fnAddress, ULONG stackAddress, L
196 196
 		if ( _tcsstr( lpszUnDSymbol, _T("(void)") ) == nullptr && _tcsstr( lpszUnDSymbol, _T("()") ) == nullptr)
197 197
 		{
198 198
 			ULONG index = 0;
199  
-			for( ; ; index++ )
  199
+			for ( ; ; index++ )
200 200
 			{
201 201
 				lpszParamSep = _tcschr( lpszParsed, _T(',') );
202 202
 				if ( lpszParamSep == nullptr )
@@ -331,7 +331,7 @@ void StackTrace( HANDLE hThread, const char* lpszMessage, FILE *file )
331 331
 
332 332
 		PrintFunctionAndSourceInfo(file, callStack);
333 333
 
334  
-		for( ULONG index = 0; ; index++ )
  334
+		for ( ULONG index = 0; ; index++ )
335 335
 		{
336 336
 			bResult = StackWalk(
337 337
 				IMAGE_FILE_MACHINE_I386,
@@ -347,14 +347,14 @@ void StackTrace( HANDLE hThread, const char* lpszMessage, FILE *file )
347 347
 			if ( index == 0 )
348 348
 				continue;
349 349
 
350  
-			if( !bResult || callStack.AddrFrame.Offset == 0 )
  350
+			if (!bResult || callStack.AddrFrame.Offset == 0)
351 351
 				break;
352 352
 
353 353
 			PrintFunctionAndSourceInfo(file, callStack);
354 354
 
355 355
 		}
356 356
 
357  
-		if ( hThread != GetCurrentThread() )
  357
+		if (hThread != GetCurrentThread())
358 358
 			ResumeThread( hThread );
359 359
 }
360 360
 
@@ -366,7 +366,7 @@ void StackTrace(HANDLE hThread, const char* lpszMessage, FILE *file, DWORD eip,
366 366
 
367 367
 	// If it's not this thread, let's suspend it, and resume it at the end
368 368
 	if ( hThread != GetCurrentThread() )
369  
-		if ( SuspendThread( hThread ) == -1 )
  369
+		if (SuspendThread( hThread ) == -1)
370 370
 		{
371 371
 			// whaaat ?!
372 372
 			etfprint(file, "Call stack info failed\n");
@@ -386,7 +386,7 @@ void StackTrace(HANDLE hThread, const char* lpszMessage, FILE *file, DWORD eip,
386 386
 
387 387
 		PrintFunctionAndSourceInfo(file, callStack);
388 388
 
389  
-		for( ULONG index = 0; ; index++ )
  389
+		for (ULONG index = 0; ; index++)
390 390
 		{
391 391
 			bResult = StackWalk(
392 392
 				IMAGE_FILE_MACHINE_I386,
@@ -399,17 +399,17 @@ void StackTrace(HANDLE hThread, const char* lpszMessage, FILE *file, DWORD eip,
399 399
 				SymGetModuleBase,
400 400
 				nullptr);
401 401
 
402  
-			if ( index == 0 )
  402
+			if (index == 0)
403 403
 				continue;
404 404
 
405  
-			if( !bResult || callStack.AddrFrame.Offset == 0 )
  405
+			if (!bResult || callStack.AddrFrame.Offset == 0)
406 406
 				break;
407 407
 
408 408
 			PrintFunctionAndSourceInfo(file, callStack);
409 409
 		}
410 410
 
411  
-		if ( hThread != GetCurrentThread() )
412  
-			ResumeThread( hThread );
  411
+		if (hThread != GetCurrentThread())
  412
+			ResumeThread(hThread);
413 413
 }
414 414
 
415 415
 char g_uefbuf[2048];
6  Source/Core/Common/FileSearch.cpp
@@ -78,9 +78,9 @@ void CFileSearch::FindFiles(const std::string& _searchString, const std::string&
78 78
 	{
79 79
 		std::string found(dp->d_name);
80 80
 
81  
-		if ((found != ".") && (found != "..")
82  
-			&& (found.size() >= end_match.size())
83  
-			&& std::equal(end_match.rbegin(), end_match.rend(), found.rbegin()))
  81
+		if ((found != ".") && (found != "..") &&
  82
+		    (found.size() >= end_match.size()) &&
  83
+		    std::equal(end_match.rbegin(), end_match.rend(), found.rbegin()))
84 84
 		{
85 85
 			std::string full_name;
86 86
 			if (_strPath.c_str()[_strPath.size()-1] == DIR_SEP_CHR)
44  Source/Core/Common/Hash.cpp
@@ -155,9 +155,9 @@ u64 GetMurmurHash3(const u8 *src, int len, u32 samples)
155 155
 	const u8 * data = (const u8*)src;
156 156
 	const int nblocks = len / 16;
157 157
 	u32 Step = (len / 8);
158  
-	if(samples == 0) samples = max(Step, 1u);
  158
+	if (samples == 0) samples = max(Step, 1u);
159 159
 	Step = Step / samples;
160  
-	if(Step < 1) Step = 1;
  160
+	if (Step < 1) Step = 1;
161 161
 
162 162
 	u64 h1 = 0x9368e53c2f6af274;
163 163
 	u64 h2 = 0x586dcd208f7cd3fd;
@@ -171,7 +171,7 @@ u64 GetMurmurHash3(const u8 *src, int len, u32 samples)
171 171
 
172 172
 	const u64 * blocks = (const u64 *)(data);
173 173
 
174  
-	for(int i = 0; i < nblocks; i+=Step)
  174
+	for (int i = 0; i < nblocks; i+=Step)
175 175
 	{
176 176
 		u64 k1 = getblock(blocks,i*2+0);
177 177
 		u64 k2 = getblock(blocks,i*2+1);
@@ -187,7 +187,7 @@ u64 GetMurmurHash3(const u8 *src, int len, u32 samples)
187 187
 	u64 k1 = 0;
188 188
 	u64 k2 = 0;
189 189
 
190  
-	switch(len & 15)
  190
+	switch (len & 15)
191 191
 	{
192 192
 	case 15: k2 ^= u64(tail[14]) << 48;
193 193
 	case 14: k2 ^= u64(tail[13]) << 40;
@@ -233,10 +233,10 @@ u64 GetCRC32(const u8 *src, int len, u32 samples)
233 233
 	u32 Step = (len / 8);
234 234
 	const u64 *data = (const u64 *)src;
235 235
 	const u64 *end = data + Step;
236  
-	if(samples == 0) samples = max(Step, 1u);
  236
+	if (samples == 0) samples = max(Step, 1u);
237 237
 	Step = Step / samples;
238  
-	if(Step < 1) Step = 1;
239  
-	while(data < end)
  238
+	if (Step < 1) Step = 1;
  239
+	while (data < end)
240 240
 	{
241 241
 		h = _mm_crc32_u64(h, data[0]);
242 242
 		data += Step;
@@ -265,10 +265,10 @@ u64 GetHashHiresTexture(const u8 *src, int len, u32 samples)
265 265
 	u32 Step = (len / 8);
266 266
 	const u64 *data = (const u64 *)src;
267 267
 	const u64 *end = data + Step;
268  
-	if(samples == 0) samples = max(Step, 1u);
  268
+	if (samples == 0) samples = max(Step, 1u);
269 269
 	Step = Step / samples;
270  
-	if(Step < 1) Step = 1;
271  
-	while(data < end)
  270
+	if (Step < 1) Step = 1;
  271
+	while (data < end)
272 272
 	{
273 273
 		u64 k = data[0];
274 274
 		data+=Step;
@@ -281,7 +281,7 @@ u64 GetHashHiresTexture(const u8 *src, int len, u32 samples)
281 281
 
282 282
 	const u8 * data2 = (const u8*)end;
283 283
 
284  
-	switch(len & 7)
  284
+	switch (len & 7)
285 285
 	{
286 286
 	case 7: h ^= u64(data2[6]) << 48;
287 287
 	case 6: h ^= u64(data2[5]) << 40;
@@ -308,10 +308,10 @@ u64 GetCRC32(const u8 *src, int len, u32 samples)
308 308
 	u32 Step = (len/4);
309 309
 	const u32 *data = (const u32 *)src;
310 310
 	const u32 *end = data + Step;
311  
-	if(samples == 0) samples = max(Step, 1u);
  311
+	if (samples == 0) samples = max(Step, 1u);
312 312
 	Step  = Step / samples;
313  
-	if(Step < 1) Step = 1;
314  
-	while(data < end)
  313
+	if (Step < 1) Step = 1;
  314
+	while (data < end)
315 315
 	{
316 316
 		h = _mm_crc32_u32(h, data[0]);
317 317
 		data += Step;
@@ -380,9 +380,9 @@ u64 GetMurmurHash3(const u8* src, int len, u32 samples)
380 380
 	u32 out[2];
381 381
 	const int nblocks = len / 8;
382 382
 	u32 Step = (len / 4);
383  
-	if(samples == 0) samples = max(Step, 1u);
  383
+	if (samples == 0) samples = max(Step, 1u);
384 384
 	Step = Step / samples;
385  
-	if(Step < 1) Step = 1;
  385
+	if (Step < 1) Step = 1;
386 386
 
387 387
 	u32 h1 = 0x8de1c3ac;
388 388
 	u32 h2 = 0xbab98226;
@@ -395,7 +395,7 @@ u64 GetMurmurHash3(const u8* src, int len, u32 samples)
395 395
 
396 396
 	const u32 * blocks = (const u32 *)(data + nblocks*8);
397 397
 
398  
-	for(int i = -nblocks; i < 0; i+=Step)
  398
+	for (int i = -nblocks; i < 0; i+=Step)
399 399
 	{
400 400
 		u32 k1 = getblock(blocks,i*2+0);
401 401
 		u32 k2 = getblock(blocks,i*2+1);
@@ -411,7 +411,7 @@ u64 GetMurmurHash3(const u8* src, int len, u32 samples)
411 411
 	u32 k1 = 0;
412 412
 	u32 k2 = 0;
413 413
 
414  
-	switch(len & 7)
  414
+	switch (len & 7)
415 415
 	{
416 416
 	case 7: k2 ^= tail[6] << 16;
417 417
 	case 6: k2 ^= tail[5] << 8;
@@ -456,10 +456,10 @@ u64 GetHashHiresTexture(const u8 *src, int len, u32 samples)
456 456
 	u32 Step = (len / 8);
457 457
 	const u64 *data = (const u64 *)src;
458 458
 	const u64 *end = data + Step;
459  
-	if(samples == 0) samples = max(Step, 1u);
  459
+	if (samples == 0) samples = max(Step, 1u);
460 460
 	Step = Step / samples;
461  
-	if(Step < 1) Step = 1;
462  
-	while(data < end)
  461
+	if (Step < 1) Step = 1;
  462
+	while (data < end)
463 463
 	{
464 464
 		u64 k = data[0];
465 465
 		data+=Step;
@@ -472,7 +472,7 @@ u64 GetHashHiresTexture(const u8 *src, int len, u32 samples)
472 472
 
473 473
 	const u8 * data2 = (const u8*)end;
474 474
 
475  
-	switch(len & 7)
  475
+	switch (len & 7)
476 476
 	{
477 477
 	case 7: h ^= u64(data2[6]) << 48;
478 478
 	case 6: h ^= u64(data2[5]) << 40;
7  Source/Core/Common/IniFile.cpp
@@ -373,8 +373,11 @@ bool IniFile::Load(const std::string& filename, bool keep_current_data)
373 373
 					// Lines starting with '$', '*' or '+' are kept verbatim.
374 374
 					// Kind of a hack, but the support for raw lines inside an
375 375
 					// INI is a hack anyway.
376  
-					if ((key == "" && value == "")
377  
-					        || (line.size() >= 1 && (line[0] == '$' || line[0] == '+' || line[0] == '*')))
  376
+					if ((key == "" && value == "") ||
  377
+					    (line.size() >= 1 &&
  378
+					     (line[0] == '$' ||
  379
+					      line[0] == '+' ||
  380
+					      line[0] == '*')))
378 381
 						current_section->lines.push_back(line);
379 382
 					else
380 383
 						current_section->Set(key, value);
4  Source/Core/Common/LinearDiskCache.h
@@ -150,8 +150,8 @@ class LinearDiskCache
150 150
 	{
151 151
 		char file_header[sizeof(Header)];
152 152
 
153  
-		return (Read(file_header, sizeof(Header))
154  
-			&& !memcmp((const char*)&m_header, file_header, sizeof(Header)));
  153
+		return (Read(file_header, sizeof(Header)) &&
  154
+		        !memcmp((const char*)&m_header, file_header, sizeof(Header)));
155 155
 	}
156 156
 
157 157
 	template <typename D>
2  Source/Core/Common/MathUtil.cpp
@@ -195,7 +195,7 @@ void Matrix44::LoadMatrix33(Matrix44 &mtx, const Matrix33 &m33)
195 195
 
196 196
 void Matrix44::Set(Matrix44 &mtx, const float mtxArray[16])
197 197
 {
198  
-	for(int i = 0; i < 16; ++i)
  198
+	for (int i = 0; i < 16; ++i)
199 199
 	{
200 200
 		mtx.data[i] = mtxArray[i];
201 201
 	}
2  Source/Core/Common/MsgHandler.cpp
@@ -56,7 +56,7 @@ bool MsgAlert(bool yes_no, int Style, const char* format, ...)
56 56
 		crit_caption = str_translator(_trans("Critical"));
57 57
 	}
58 58
 
59  
-	switch(Style)
  59
+	switch (Style)
60 60
 	{
61 61
 		case INFORMATION:
62 62
 			caption = info_caption;
4  Source/Core/Common/SettingsHandler.cpp
@@ -84,13 +84,13 @@ void SettingsHandler::Reset()
84 84
 
85 85
 void SettingsHandler::AddSetting(const std::string& key, const std::string& value)
86 86
 {
87  
-	for(const char& c : key) {
  87
+	for (const char& c : key) {
88 88
 		WriteByte(c);
89 89
 	}
90 90
 
91 91
 	WriteByte('=');
92 92
 
93  
-	for(const char& c : value) {
  93
+	for (const char& c : value) {
94 94
 		WriteByte(c);
95 95
 	}
96 96
 
10  Source/Core/Common/StringUtil.cpp
@@ -173,8 +173,8 @@ bool TryParse(const std::string &str, u32 *const output)
173 173
 		return false;
174 174
 
175 175
 #if ULONG_MAX > UINT_MAX
176  
-	if (value >= 0x100000000ull
177  
-	    && value <= 0xFFFFFFFF00000000ull)
  176
+	if (value >= 0x100000000ull &&
  177
+	    value <= 0xFFFFFFFF00000000ull)
178 178
 		return false;
179 179
 #endif
180 180
 
@@ -275,7 +275,7 @@ void SplitString(const std::string& str, const char delim, std::vector<std::stri
275 275
 
276 276
 std::string ReplaceAll(std::string result, const std::string& src, const std::string& dest)
277 277
 {
278  
-	while(1)
  278
+	while (1)
279 279
 	{
280 280
 		size_t pos = result.find(src);
281 281
 		if (pos == std::string::npos) break;
@@ -336,8 +336,8 @@ void SplitString(const std::string& str, const char delim, std::vector<std::stri
336 336
 		if (*pSrc == '%')
337 337
 		{
338 338
 			char dec1, dec2;
339  
-			if (16 != (dec1 = HEX2DEC[*(pSrc + 1)])
340  
-				&& 16 != (dec2 = HEX2DEC[*(pSrc + 2)]))
  339
+			if (16 != (dec1 = HEX2DEC[*(pSrc + 1)]) &&
  340
+			    16 != (dec2 = HEX2DEC[*(pSrc + 2)]))
341 341
 			{
342 342
 				*pEnd++ = (dec1 << 4) + dec2;
343 343
 				pSrc += 3;
2  Source/Core/Common/Timer.cpp
@@ -153,7 +153,7 @@ u64 Timer::GetLocalTimeSinceJan1970()
153 153
 
154 154
 	// Account for DST where needed
155 155
 	gmTime = localtime(&sysTime);
156  
-	if(gmTime->tm_isdst == 1)
  156
+	if (gmTime->tm_isdst == 1)
157 157
 		tzDST = 3600;
158 158
 	else
159 159
 		tzDST = 0;
148  Source/Core/Common/x64ABI.cpp
@@ -287,12 +287,15 @@ void XEmitter::ABI_PopAllCalleeSavedRegsAndAdjustStack() {
287 287
 void XEmitter::ABI_CallFunction(void *func) {
288 288
 	ABI_AlignStack(0);
289 289
 	u64 distance = u64(func) - (u64(code) + 5);
290  
-	if (distance >= 0x0000000080000000ULL
291  
-	 && distance <  0xFFFFFFFF80000000ULL) {
  290
+	if (distance >= 0x0000000080000000ULL &&
  291
+	    distance <  0xFFFFFFFF80000000ULL)
  292
+	{
292 293
 		// Far call
293 294
 		MOV(64, R(RAX), Imm64((u64)func));
294 295
 		CALLptr(R(RAX));
295  
-	} else {
  296
+	}
  297
+	else
  298
+	{
296 299
 		CALL(func);
297 300
 	}
298 301
 	ABI_RestoreStack(0);
@@ -302,12 +305,15 @@ void XEmitter::ABI_CallFunctionC16(void *func, u16 param1) {
302 305
 	ABI_AlignStack(0);
303 306
 	MOV(32, R(ABI_PARAM1), Imm32((u32)param1));
304 307
 	u64 distance = u64(func) - (u64(code) + 5);
305  
-	if (distance >= 0x0000000080000000ULL
306  
-	 && distance <  0xFFFFFFFF80000000ULL) {
  308
+	if (distance >= 0x0000000080000000ULL &&
  309
+	    distance <  0xFFFFFFFF80000000ULL)
  310
+	{
307 311
 		// Far call
308 312
 		MOV(64, R(RAX), Imm64((u64)func));
309 313
 		CALLptr(R(RAX));
310  
-	} else {
  314
+	}
  315
+	else
  316
+	{
311 317
 		CALL(func);
312 318
 	}
313 319
 	ABI_RestoreStack(0);
@@ -318,12 +324,15 @@ void XEmitter::ABI_CallFunctionCC16(void *func, u32 param1, u16 param2) {
318 324
 	MOV(32, R(ABI_PARAM1), Imm32(param1));
319 325
 	MOV(32, R(ABI_PARAM2), Imm32((u32)param2));
320 326
 	u64 distance = u64(func) - (u64(code) + 5);
321  
-	if (distance >= 0x0000000080000000ULL
322  
-		&& distance <  0xFFFFFFFF80000000ULL) {
323  
-			// Far call
324  
-			MOV(64, R(RAX), Imm64((u64)func));
325  
-			CALLptr(R(RAX));
326  
-	} else {
  327
+	if (distance >= 0x0000000080000000ULL &&
  328
+	    distance <  0xFFFFFFFF80000000ULL)
  329
+	{
  330
+		// Far call
  331
+		MOV(64, R(RAX), Imm64((u64)func));
  332
+		CALLptr(R(RAX));
  333
+	}
  334
+	else
  335
+	{
327 336
 		CALL(func);
328 337
 	}
329 338
 	ABI_RestoreStack(0);
@@ -333,12 +342,15 @@ void XEmitter::ABI_CallFunctionC(void *func, u32 param1) {
333 342
 	ABI_AlignStack(0);
334 343
 	MOV(32, R(ABI_PARAM1), Imm32(param1));
335 344
 	u64 distance = u64(func) - (u64(code) + 5);
336  
-	if (distance >= 0x0000000080000000ULL
337  
-	 && distance <  0xFFFFFFFF80000000ULL) {
  345
+	if (distance >= 0x0000000080000000ULL &&
  346
+	    distance <  0xFFFFFFFF80000000ULL)
  347
+	{
338 348
 		// Far call
339 349
 		MOV(64, R(RAX), Imm64((u64)func));
340 350
 		CALLptr(R(RAX));
341  
-	} else {
  351
+	}
  352
+	else
  353
+	{
342 354
 		CALL(func);
343 355
 	}
344 356
 	ABI_RestoreStack(0);
@@ -349,12 +361,15 @@ void XEmitter::ABI_CallFunctionCC(void *func, u32 param1, u32 param2) {
349 361
 	MOV(32, R(ABI_PARAM1), Imm32(param1));
350 362
 	MOV(32, R(ABI_PARAM2), Imm32(param2));
351 363
 	u64 distance = u64(func) - (u64(code) + 5);
352  
-	if (distance >= 0x0000000080000000ULL
353  
-	 && distance <  0xFFFFFFFF80000000ULL) {
  364
+	if (distance >= 0x0000000080000000ULL &&
  365
+	    distance <  0xFFFFFFFF80000000ULL)
  366
+	{
354 367
 		// Far call
355 368
 		MOV(64, R(RAX), Imm64((u64)func));
356 369
 		CALLptr(R(RAX));
357  
-	} else {
  370
+	}
  371
+	else
  372
+	{
358 373
 		CALL(func);
359 374
 	}
360 375
 	ABI_RestoreStack(0);
@@ -365,12 +380,15 @@ void XEmitter::ABI_CallFunctionCP(void *func, u32 param1, void *param2) {
365 380
 	MOV(32, R(ABI_PARAM1), Imm32(param1));
366 381
 	MOV(64, R(ABI_PARAM2), Imm64((u64)param2));
367 382
 	u64 distance = u64(func) - (u64(code) + 5);
368  
-	if (distance >= 0x0000000080000000ULL
369  
-	 && distance <  0xFFFFFFFF80000000ULL) {
  383
+	if (distance >= 0x0000000080000000ULL &&
  384
+	    distance <  0xFFFFFFFF80000000ULL)
  385
+	{
370 386
 		// Far call
371 387
 		MOV(64, R(RAX), Imm64((u64)func));
372 388
 		CALLptr(R(RAX));
373  
-	} else {
  389
+	}
  390
+	else
  391
+	{
374 392
 		CALL(func);
375 393
 	}
376 394
 	ABI_RestoreStack(0);
@@ -382,12 +400,15 @@ void XEmitter::ABI_CallFunctionCCC(void *func, u32 param1, u32 param2, u32 param
382 400
 	MOV(32, R(ABI_PARAM2), Imm32(param2));
383 401
 	MOV(32, R(ABI_PARAM3), Imm32(param3));
384 402
 	u64 distance = u64(func) - (u64(code) + 5);
385  
-	if (distance >= 0x0000000080000000ULL
386  
-	 && distance <  0xFFFFFFFF80000000ULL) {
  403
+	if (distance >= 0x0000000080000000ULL &&
  404
+	    distance <  0xFFFFFFFF80000000ULL)
  405
+	{
387 406
 		// Far call
388 407
 		MOV(64, R(RAX), Imm64((u64)func));
389 408
 		CALLptr(R(RAX));
390  
-	} else {
  409
+	}
  410
+	else
  411
+	{
391 412
 		CALL(func);
392 413
 	}
393 414
 	ABI_RestoreStack(0);
@@ -399,12 +420,15 @@ void XEmitter::ABI_CallFunctionCCP(void *func, u32 param1, u32 param2, void *par
399 420
 	MOV(32, R(ABI_PARAM2), Imm32(param2));
400 421
 	MOV(64, R(ABI_PARAM3), Imm64((u64)param3));
401 422
 	u64 distance = u64(func) - (u64(code) + 5);
402  
-	if (distance >= 0x0000000080000000ULL
403  
-	 && distance <  0xFFFFFFFF80000000ULL) {
  423
+	if (distance >= 0x0000000080000000ULL &&
  424
+	    distance <  0xFFFFFFFF80000000ULL)
  425
+	{
404 426
 		// Far call
405 427
 		MOV(64, R(RAX), Imm64((u64)func));
406 428
 		CALLptr(R(RAX));
407  
-	} else {
  429
+	}
  430
+	else
  431
+	{
408 432
 		CALL(func);
409 433
 	}
410 434
 	ABI_RestoreStack(0);
@@ -417,12 +441,15 @@ void XEmitter::ABI_CallFunctionCCCP(void *func, u32 param1, u32 param2, u32 para
417 441
 	MOV(32, R(ABI_PARAM3), Imm32(param3));
418 442
 	MOV(64, R(ABI_PARAM4), Imm64((u64)param4));
419 443
 	u64 distance = u64(func) - (u64(code) + 5);
420  
-	if (distance >= 0x0000000080000000ULL
421  
-	 && distance <  0xFFFFFFFF80000000ULL) {
  444
+	if (distance >= 0x0000000080000000ULL &&
  445
+	    distance <  0xFFFFFFFF80000000ULL)
  446
+	{
422 447
 		// Far call
423 448
 		MOV(64, R(RAX), Imm64((u64)func));
424 449
 		CALLptr(R(RAX));
425  
-	} else {
  450
+	}
  451
+	else
  452
+	{
426 453
 		CALL(func);
427 454
 	}
428 455
 	ABI_RestoreStack(0);
@@ -433,12 +460,15 @@ void XEmitter::ABI_CallFunctionPC(void *func, void *param1, u32 param2) {
433 460
 	MOV(64, R(ABI_PARAM1), Imm64((u64)param1));
434 461
 	MOV(32, R(ABI_PARAM2), Imm32(param2));
435 462
 	u64 distance = u64(func) - (u64(code) + 5);
436  
-	if (distance >= 0x0000000080000000ULL
437  
-	 && distance <  0xFFFFFFFF80000000ULL) {
  463
+	if (distance >= 0x0000000080000000ULL &&
  464
+	    distance <  0xFFFFFFFF80000000ULL)
  465
+	{
438 466
 		// Far call
439 467
 		MOV(64, R(RAX), Imm64((u64)func));
440 468
 		CALLptr(R(RAX));
441  
-	} else {
  469
+	}
  470
+	else
  471
+	{
442 472
 		CALL(func);
443 473
 	}
444 474
 	ABI_RestoreStack(0);
@@ -450,12 +480,15 @@ void XEmitter::ABI_CallFunctionPPC(void *func, void *param1, void *param2, u32 p
450 480
 	MOV(64, R(ABI_PARAM2), Imm64((u64)param2));
451 481
 	MOV(32, R(ABI_PARAM3), Imm32(param3));
452 482
 	u64 distance = u64(func) - (u64(code) + 5);
453  
-	if (distance >= 0x0000000080000000ULL
454  
-	 && distance <  0xFFFFFFFF80000000ULL) {
  483
+	if (distance >= 0x0000000080000000ULL &&
  484
+	    distance <  0xFFFFFFFF80000000ULL)
  485
+	{
455 486
 		// Far call
456 487
 		MOV(64, R(RAX), Imm64((u64)func));
457 488
 		CALLptr(R(RAX));
458  
-	} else {
  489
+	}
  490
+	else
  491
+	{
459 492
 		CALL(func);
460 493
 	}
461 494
 	ABI_RestoreStack(0);
@@ -467,12 +500,15 @@ void XEmitter::ABI_CallFunctionR(void *func, X64Reg reg1) {
467 500
 	if (reg1 != ABI_PARAM1)
468 501
 		MOV(32, R(ABI_PARAM1), R(reg1));
469 502
 	u64 distance = u64(func) - (u64(code) + 5);
470  
-	if (distance >= 0x0000000080000000ULL
471  
-	 && distance <  0xFFFFFFFF80000000ULL) {
  503
+	if (distance >= 0x0000000080000000ULL &&
  504
+	    distance <  0xFFFFFFFF80000000ULL)
  505
+	{
472 506
 		// Far call
473 507
 		MOV(64, R(RAX), Imm64((u64)func));
474 508
 		CALLptr(R(RAX));
475  
-	} else {
  509
+	}
  510
+	else
  511
+	{
476 512
 		CALL(func);
477 513
 	}
478 514
 	ABI_RestoreStack(0);
@@ -481,24 +517,30 @@ void XEmitter::ABI_CallFunctionR(void *func, X64Reg reg1) {
481 517
 // Pass two registers as parameters.
482 518
 void XEmitter::ABI_CallFunctionRR(void *func, X64Reg reg1, X64Reg reg2, bool noProlog) {
483 519
 	ABI_AlignStack(0, noProlog);
484  
-	if (reg2 != ABI_PARAM1) {
  520
+	if (reg2 != ABI_PARAM1)
  521
+	{
485 522
 		if (reg1 != ABI_PARAM1)
486 523
 			MOV(64, R(ABI_PARAM1), R(reg1));
487 524
 		if (reg2 != ABI_PARAM2)
488 525
 			MOV(64, R(ABI_PARAM2), R(reg2));
489  
-	} else {
  526
+	}
  527
+	else
  528
+	{
490 529
 		if (reg2 != ABI_PARAM2)
491 530
 			MOV(64, R(ABI_PARAM2), R(reg2));
492 531
 		if (reg1 != ABI_PARAM1)
493 532
 			MOV(64, R(ABI_PARAM1), R(reg1));
494 533
 	}
495 534
 	u64 distance = u64(func) - (u64(code) + 5);
496  
-	if (distance >= 0x0000000080000000ULL
497  
-	 && distance <  0xFFFFFFFF80000000ULL) {
  535
+	if (distance >= 0x0000000080000000ULL &&
  536
+	    distance <  0xFFFFFFFF80000000ULL)
  537
+	{
498 538
 		// Far call
499 539
 		MOV(64, R(RAX), Imm64((u64)func));
500 540
 		CALLptr(R(RAX));
501  
-	} else {
  541
+	}
  542
+	else
  543
+	{
502 544
 		CALL(func);
503 545
 	}
504 546
 	ABI_RestoreStack(0, noProlog);
@@ -511,12 +553,15 @@ void XEmitter::ABI_CallFunctionAC(void *func, const Gen::OpArg &arg1, u32 param2
511 553
 		MOV(32, R(ABI_PARAM1), arg1);
512 554
 	MOV(32, R(ABI_PARAM2), Imm32(param2));
513 555
 	u64 distance = u64(func) - (u64(code) + 5);
514  
-	if (distance >= 0x0000000080000000ULL
515  
-	 && distance <  0xFFFFFFFF80000000ULL) {
  556
+	if (distance >= 0x0000000080000000ULL &&
  557
+	    distance <  0xFFFFFFFF80000000ULL)
  558
+	{
516 559
 		// Far call
517 560
 		MOV(64, R(RAX), Imm64((u64)func));
518 561
 		CALLptr(R(RAX));
519  
-	} else {
  562
+	}
  563
+	else
  564
+	{
520 565
 		CALL(func);
521 566
 	}
522 567
 	ABI_RestoreStack(0);
@@ -528,12 +573,15 @@ void XEmitter::ABI_CallFunctionA(void *func, const Gen::OpArg &arg1)
528 573
 	if (!arg1.IsSimpleReg(ABI_PARAM1))
529 574
 		MOV(32, R(ABI_PARAM1), arg1);
530 575
 	u64 distance = u64(func) - (u64(code) + 5);
531  
-	if (distance >= 0x0000000080000000ULL
532  
-	 && distance <  0xFFFFFFFF80000000ULL) {
  576
+	if (distance >= 0x0000000080000000ULL &&
  577
+	    distance <  0xFFFFFFFF80000000ULL)
  578
+	{
533 579
 		// Far call
534 580
 		MOV(64, R(RAX), Imm64((u64)func));
535 581
 		CALLptr(R(RAX));
536  
-	} else {
  582
+	}
  583
+	else
  584
+	{
537 585
 		CALL(func);
538 586
 	}
539 587
 	ABI_RestoreStack(0);
2  Source/Core/Common/x64Analyzer.cpp
@@ -49,7 +49,7 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo *info)
49 49
 
50 50
 	// Skip two-byte opcode byte
51 51
 	bool twoByte = false;
52  
-	if(codeByte == 0x0F)
  52
+	if (codeByte == 0x0F)
53 53
 	{
54 54
 		twoByte = true;
55 55
 		codeByte2 = *codePtr++;
30  Source/Core/Common/x64Emitter.cpp
@@ -208,11 +208,12 @@ void OpArg::WriteRest(XEmitter *emit, int extraBytes, X64Reg _operandReg,
208 208
 #if _M_X86_64
209 209
 		u64 ripAddr = (u64)emit->GetCodePtr() + 4 + extraBytes;
210 210
 		s64 distance = (s64)offset - (s64)ripAddr;
211  
-		_assert_msg_(DYNA_REC, (distance < 0x80000000LL
212  
-					&& distance >=  -0x80000000LL) ||
213  
-			     !warn_64bit_offset,
214  
-			     "WriteRest: op out of range (0x%" PRIx64 " uses 0x%" PRIx64 ")",
215  
-			     ripAddr, offset);
  211
+		_assert_msg_(DYNA_REC, 
  212
+		             (distance < 0x80000000LL &&
  213
+		              distance >=  -0x80000000LL) ||
  214
+		             !warn_64bit_offset,
  215
+		             "WriteRest: op out of range (0x%" PRIx64 " uses 0x%" PRIx64 ")",
  216
+		             ripAddr, offset);
216 217
 		s32 offs = (s32)distance;
217 218
 		emit->Write32((u32)offs);
218 219
 #else
@@ -358,9 +359,9 @@ void XEmitter::JMP(const u8 *addr, bool force5Bytes)
358 359
 	{
359 360
 		s64 distance = (s64)(fn - ((u64)code + 5));
360 361
 
361  
-		_assert_msg_(DYNA_REC, distance >= -0x80000000LL
362  
-			     && distance < 0x80000000LL,
363  
-			     "Jump target too far away, needs indirect register");
  362
+		_assert_msg_(DYNA_REC,
  363
+		             distance >= -0x80000000LL && distance < 0x80000000LL,
  364
+		             "Jump target too far away, needs indirect register");
364 365
 		Write8(0xE9);
365 366
 		Write32((u32)(s32)distance);
366 367
 	}
@@ -396,9 +397,10 @@ void XEmitter::CALLptr(OpArg arg)
396 397
 void XEmitter::CALL(const void *fnptr)
397 398
 {
398 399
 	u64 distance = u64(fnptr) - (u64(code) + 5);
399  
-	_assert_msg_(DYNA_REC, distance < 0x0000000080000000ULL
400  
-		     || distance >=  0xFFFFFFFF80000000ULL,
401  
-		     "CALL out of range (%p calls %p)", code, fnptr);
  400
+	_assert_msg_(DYNA_REC,
  401
+	             distance < 0x0000000080000000ULL ||
  402
+	             distance >=  0xFFFFFFFF80000000ULL,
  403
+	             "CALL out of range (%p calls %p)", code, fnptr);
402 404
 	Write8(0xE8);
403 405
 	Write32(u32(distance));
404 406
 }
@@ -456,9 +458,9 @@ void XEmitter::J_CC(CCFlags conditionCode, const u8 * addr, bool force5Bytes)
456 458
 	else
457 459
 	{
458 460
 		s64 distance = (s64)(fn - ((u64)code + 6));
459  
-		_assert_msg_(DYNA_REC, distance >= -0x80000000LL
460  
-			     && distance < 0x80000000LL,
461  
-			     "Jump target too far away, needs indirect register");
  461
+		_assert_msg_(DYNA_REC,
  462
+		             distance >= -0x80000000LL && distance < 0x80000000LL,
  463
+			         "Jump target too far away, needs indirect register");
462 464
 		Write8(0x0F);
463 465
 		Write8(0x80 + conditionCode);
464 466
 		Write32((u32)(s32)distance);
6  Source/Core/Core/ActionReplay.cpp
@@ -115,8 +115,8 @@ struct ARAddr
115 115
 void LoadCodes(const IniFile& globalIni, const IniFile& localIni, bool forceLoad)
116 116
 {
117 117
 	// Parses the Action Replay section of a game ini file.
118  
-	if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats
119  
-		&& !forceLoad)
  118
+	if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats &&
  119
+		!forceLoad)
120 120
 		return;
121 121
 
122 122
 	arCodes.clear();
@@ -895,7 +895,7 @@ bool ConditionalCode(const ARAddr& addr, const u32 data, int* const pSkipCount)
895 895
 
896 896
 bool CompareValues(const u32 val1, const u32 val2, const int type)
897 897
 {
898  
-	switch(type)
  898
+	switch (type)
899 899
 	{
900 900
 	case CONDTIONAL_EQUAL:
901 901
 		LogInfo("Type 1: If Equal");
2  Source/Core/Core/Boot/Boot.cpp
@@ -312,7 +312,7 @@ bool CBoot::BootUp()
312 312
 	// ELF
313 313
 	case SCoreStartupParameter::BOOT_ELF:
314 314
 	{
315  
-		if(!File::Exists(_StartupPara.m_strFilename))
  315
+		if (!File::Exists(_StartupPara.m_strFilename))
316 316
 		{
317 317
 			PanicAlertT("The file you specified (%s) does not exist",
318 318
 				_StartupPara.m_strFilename.c_str());
4  Source/Core/Core/Boot/Boot_BS2Emu.cpp
@@ -137,7 +137,7 @@ bool CBoot::EmulatedBS2_GC()
137 137
 		INFO_LOG(MASTER_LOG, "DVDRead: offset: %08x   memOffset: %08x   length: %i", iDVDOffset, iRamAddress, iLength);
138 138
 		DVDInterface::DVDRead(iDVDOffset, iRamAddress, iLength);
139 139
 
140  
-	} while(PowerPC::ppcState.gpr[3] != 0x00);
  140
+	} while (PowerPC::ppcState.gpr[3] != 0x00);
141 141
 
142 142
 	// iAppLoaderClose
143 143
 	DEBUG_LOG(MASTER_LOG, "call iAppLoaderClose");
@@ -377,7 +377,7 @@ bool CBoot::EmulatedBS2_Wii()
377 377
 
378 378
 			INFO_LOG(BOOT, "DVDRead: offset: %08x   memOffset: %08x   length: %i", iDVDOffset, iRamAddress, iLength);
379 379
 			DVDInterface::DVDRead(iDVDOffset, iRamAddress, iLength);
380  
-		} while(PowerPC::ppcState.gpr[3] != 0x00);
  380
+		} while (PowerPC::ppcState.gpr[3] != 0x00);
381 381
 
382 382
 		// iAppLoaderClose
383 383
 		DEBUG_LOG(BOOT, "Run iAppLoaderClose");
2  Source/Core/Core/Boot/Boot_WiiWAD.cpp
@@ -28,7 +28,7 @@ static u32 state_checksum(u32 *buf, int len)
28 28
 	u32 checksum = 0;
29 29
 	len = len>>2;
30 30
 
31  
-	for(int i=0; i<len; i++)
  31
+	for (int i=0; i<len; i++)
32 32
 	{
33 33
 		checksum += buf[i];
34 34
 	}
8  Source/Core/Core/Core.cpp
@@ -309,7 +309,7 @@ void CpuThread()
309 309
 
310 310
 
311 311
 	#ifdef USE_GDBSTUB
312  
-	if(_CoreParameter.iGDBPort > 0)
  312
+	if (_CoreParameter.iGDBPort > 0)
313 313
 	{
314 314
 		gdb_init(_CoreParameter.iGDBPort);
315 315
 		// break at next instruction (the first instruction)
@@ -353,7 +353,7 @@ void FifoPlayerThread()
353 353
 
354 354
 	g_bStarted = false;
355 355
 
356  
-	if(!_CoreParameter.bCPUThread)
  356
+	if (!_CoreParameter.bCPUThread)
357 357
 		g_video_backend->Video_Cleanup();
358 358
 
359 359
 	return;
@@ -492,7 +492,7 @@ void EmuThread()
492 492
 
493 493
 	INFO_LOG(CONSOLE, "%s", StopMessage(true, "CPU thread stopped.").c_str());
494 494
 
495  
-	if(_CoreParameter.bCPUThread)
  495
+	if (_CoreParameter.bCPUThread)
496 496
 		g_video_backend->Video_Cleanup();
497 497
 
498 498
 	VolumeHandler::EjectVolume();
@@ -644,7 +644,7 @@ bool ShouldSkipFrame(int skipped)
644 644
 // Should be called from GPU thread when a frame is drawn
645 645
 void Callback_VideoCopiedToXFB(bool video_update)
646 646
 {
647  
-	if(video_update)
  647
+	if (video_update)
648 648
 		Common::AtomicIncrement(DrawnFrame);
649 649
 	Movie::FrameUpdate();
650 650
 }
12  Source/Core/Core/CoreTiming.cpp
@@ -63,7 +63,7 @@ struct BaseEvent
63 63
 
64 64
 Event* GetNewEvent()
65 65
 {
66  
-	if(!eventPool)
  66
+	if (!eventPool)
67 67
 		return new Event;
68 68
 
69 69
 	Event* ev = eventPool;
@@ -127,7 +127,7 @@ void Shutdown()
127 127
 	ClearPendingEvents();
128 128
 	UnregisterAllEvents();
129 129
 
130  
-	while(eventPool)
  130
+	while (eventPool)
131 131
 	{
132 132
 		Event *ev = eventPool;
133 133
 		eventPool = ev->next;
@@ -214,7 +214,7 @@ void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata
214 214
 // in which case the event will get handled immediately, before returning.
215 215
 void ScheduleEvent_Threadsafe_Immediate(int event_type, u64 userdata)
216 216
 {
217  
-	if(Core::IsCPUThread())
  217
+	if (Core::IsCPUThread())
218 218
 	{
219 219
 		event_types[event_type].callback(userdata, 0);
220 220
 	}
@@ -238,10 +238,10 @@ void AddEventToQueue(Event* ne)
238 238
 {
239 239
 	Event* prev = nullptr;
240 240
 	Event** pNext = &first;
241  
-	for(;;)
  241
+	for (;;)
242 242
 	{
243 243
 		Event*& next = *pNext;
244  
-		if(!next || ne->time < next->time)
  244
+		if (!next || ne->time < next->time)
245 245
 		{
246 246
 			ne->next = next;
247 247
 			next = ne;
@@ -287,7 +287,7 @@ void RemoveEvent(int event_type)
287 287
 	if (!first)
288 288
 		return;
289 289
 
290  
-	while(first)
  290
+	while (first)
291 291
 	{
292 292
 		if (first->type == event_type)
293 293
 		{
16  Source/Core/Core/DSP/DSPAssembler.cpp
@@ -90,7 +90,7 @@
90 90
 
91 91
 DSPAssembler::~DSPAssembler()
92 92
 {
93  
-	if(gdg_buffer)
  93
+	if (gdg_buffer)
94 94
 		free(gdg_buffer);
95 95
 }
96 96
 
@@ -109,7 +109,7 @@ bool DSPAssembler::Assemble(const char *text, std::vector<u16> &code, std::vecto
109 109
 	if (m_totalSize > 0)
110 110
 	{
111 111
 		gdg_buffer = (char *)malloc(m_totalSize * sizeof(u16) + 4);
112  
-		if(!gdg_buffer)
  112
+		if (!gdg_buffer)
113 113
 			return false;
114 114
 
115 115
 		memset(gdg_buffer, 0, m_totalSize * sizeof(u16));
@@ -121,11 +121,13 @@ bool DSPAssembler::Assemble(const char *text, std::vector<u16> &code, std::vecto
121 121
 		return false;
122 122
 
123 123
 	code.resize(m_totalSize);
124  
-	for (int i = 0; i < m_totalSize; i++) {
  124
+	for (int i = 0; i < m_totalSize; i++)
  125
+	{
125 126
 		code[i] = *(u16 *)(gdg_buffer + i * 2);
126 127
 	}
127 128
 
128  
-	if(gdg_buffer) {
  129
+	if (gdg_buffer)
  130
+	{
129 131
 		free(gdg_buffer);
130 132
 		gdg_buffer = nullptr;
131 133
 	}
@@ -223,7 +225,7 @@ s32 DSPAssembler::ParseValue(const char *str)
223 225
 				for (int i = 2; ptr[i] != 0; i++)
224 226
 				{
225 227
 					val *=2;
226  
-					if(ptr[i] >= '0' && ptr[i] <= '1')
  228
+					if (ptr[i] >= '0' && ptr[i] <= '1')
227 229
 						val += ptr[i] - '0';
228 230
 					else
229 231
 						ShowError(ERR_INCORRECT_BIN, str);
@@ -773,7 +775,7 @@ bool DSPAssembler::AssembleFile(const char *fname, int pass)
773 775
 	{
774 776
 		int opcode_size = 0;
775 777
 		fsrc.getline(line, LINEBUF_SIZE);
776  
-		if(fsrc.fail())
  778
+		if (fsrc.fail())
777 779
 			break;
778 780
 
779 781
 		cur_line = line;
@@ -836,7 +838,7 @@ bool DSPAssembler::AssembleFile(const char *fname, int pass)
836 838
 		{
837 839
 			bool valid = true;
838 840
 
839  
-			for(int j = 0; j < (int)col_pos; j++)
  841
+			for (int j = 0; j < (int)col_pos; j++)
840 842
 			{
841 843
 				if (j == 0)
842 844
 					if (!((ptr[j] >= 'A' && ptr[j] <= 'Z') || (ptr[j] == '_')))
6  Source/Core/Core/DSP/DSPCodeUtil.cpp
@@ -135,7 +135,7 @@ void CodesToHeader(const std::vector<u16> *codes, const std::vector<std::string>
135 135
 {
136 136
 	std::vector<std::vector<u16> > codes_padded;
137 137
 	u32 reserveSize = 0;
138  
-	for(u32 i = 0; i < numCodes; i++)
  138
+	for (u32 i = 0; i < numCodes; i++)
139 139
 	{
140 140
 		codes_padded.push_back(codes[i]);
141 141
 		// Pad with nops to 32byte boundary
@@ -158,9 +158,9 @@ void CodesToHeader(const std::vector<u16> *codes, const std::vector<std::string>
158 158
 	header.append("};\n\n");
159 159
 	header.append("const unsigned short dsp_code[NUM_UCODES][0x1000] = {\n");
160 160
 
161  
-	for(u32 i = 0; i < numCodes; i++)
  161
+	for (u32 i = 0; i < numCodes; i++)
162 162
 	{
163  
-		if(codes[i].size() == 0)
  163
+		if (codes[i].size() == 0)
164 164
 			continue;
165 165
 
166 166
 		header.append("\t{\n\t\t");
10  Source/Core/Core/DSP/DSPCore.cpp
@@ -202,7 +202,7 @@ bool DSPCore_Init(const char *irom_filename, const char *coef_filename,
202 202
 	WriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false);
203 203
 
204 204
 	// Initialize JIT, if necessary
205  
-	if(bUsingJIT)
  205
+	if (bUsingJIT)
206 206
 		dspjit = new DSPEmitter();
207 207
 
208 208
 	core_state = DSPCORE_RUNNING;
@@ -216,7 +216,7 @@ void DSPCore_Shutdown()
216 216
 
217 217
 	core_state = DSPCORE_STOP;
218 218
 
219  
-	if(dspjit) {
  219
+	if (dspjit) {
220 220
 		delete dspjit;
221 221
 		dspjit = nullptr;
222 222
 	}
@@ -377,7 +377,7 @@ void CompileCurrent()
377 377
 	while (retry)
378 378
 	{
379 379
 		retry = false;
380  
-		for(u16 i = 0x0000; i < 0xffff; ++i)
  380
+		for (u16 i = 0x0000; i < 0xffff; ++i)
381 381
 		{
382 382
 			if (!dspjit->unresolvedJumps[i].empty())
383 383
 			{
@@ -392,7 +392,7 @@ void CompileCurrent()
392 392
 
393 393
 u16 DSPCore_ReadRegister(int reg)
394 394
 {
395  
-	switch(reg)
  395
+	switch (reg)
396 396
 	{
397 397
 	case DSP_REG_AR0:
398 398
 	case DSP_REG_AR1:
@@ -443,7 +443,7 @@ u16 DSPCore_ReadRegister(int reg)
443 443
 
444 444
 void DSPCore_WriteRegister(int reg, u16 val)
445 445
 {
446  
-	switch(reg)
  446
+	switch (reg)
447 447
 	{
448 448
 	case DSP_REG_AR0:
449 449
 	case DSP_REG_AR1:
8  Source/Core/Core/DSP/DSPEmitter.cpp
@@ -34,7 +34,7 @@
34 34
 	stubEntryPoint = CompileStub();
35 35
 
36 36
 	//clear all of the block references
37  
-	for(int i = 0x0000; i < MAX_BLOCKS; i++)
  37
+	for (int i = 0x0000; i < MAX_BLOCKS; i++)
38 38
 	{
39 39
 		blocks[i] = (DSPCompiledCode)stubEntryPoint;
40 40
 		blockLinks[i] = nullptr;
@@ -52,7 +52,7 @@
52 52
 
53 53
 void DSPEmitter::ClearIRAM()
54 54
 {
55  
-	for(int i = 0x0000; i < 0x1000; i++)
  55
+	for (int i = 0x0000; i < 0x1000; i++)
56 56
 	{
57 57
 		blocks[i] = (DSPCompiledCode)stubEntryPoint;
58 58
 		blockLinks[i] = nullptr;
@@ -68,7 +68,7 @@ void DSPEmitter::ClearIRAMandDSPJITCodespaceReset()
68 68
 	CompileDispatcher();
69 69
 	stubEntryPoint = CompileStub();
70 70
 
71  
-	for(int i = 0x0000; i < 0x10000; i++)
  71
+	for (int i = 0x0000; i < 0x10000; i++)
72 72
 	{
73 73
 		blocks[i] = (DSPCompiledCode)stubEntryPoint;
74 74
 		blockLinks[i] = nullptr;
@@ -334,7 +334,7 @@ void DSPEmitter::Compile(u16 start_addr)
334 334
 	{
335 335
 		blockLinks[start_addr] = blockLinkEntry;
336 336
 
337  
-		for(u16 i = 0x0000; i < 0xffff; ++i)
  337
+		for (u16 i = 0x0000; i < 0xffff; ++i)
338 338
 		{
339 339
 			if (!unresolvedJumps[i].empty())
340 340
 			{
6  Source/Core/Core/DSP/DSPIntExtOps.cpp
@@ -75,7 +75,7 @@ void mv(const UDSPInstruction opc)
75 75
 	u8 sreg = (opc & 0x3) + DSP_REG_ACL0;
76 76
 	u8 dreg = ((opc >> 2) & 0x3);
77 77
 
78  
-	switch(sreg)
  78
+	switch (sreg)
79 79
 	{
80 80
 	case DSP_REG_ACL0:
81 81
 	case DSP_REG_ACL1:
@@ -97,7 +97,7 @@ void s(const UDSPInstruction opc)
97 97
 	u8 dreg = opc & 0x3;
98 98
 	u8 sreg = ((opc >> 3) & 0x3) + DSP_REG_ACL0;
99 99
 
100  
-	switch(sreg)
  100
+	switch (sreg)
101 101
 	{
102 102
 	case DSP_REG_ACL0:
103 103
 	case DSP_REG_ACL1:
@@ -120,7 +120,7 @@ void sn(const UDSPInstruction opc)
120 120
 	u8 dreg = opc & 0x3;
121 121
 	u8 sreg = ((opc >> 3) & 0x3) + DSP_REG_ACL0;
122 122
 
123  
-	switch(sreg)
  123
+	switch (sreg)
124 124
 	{
125 125
 	case DSP_REG_ACL0:
126 126
 	case DSP_REG_ACL1:
6  Source/Core/Core/DSP/DspIntArithmetic.cpp
@@ -370,7 +370,7 @@ void addr(const UDSPInstruction opc)
370 370
 
371 371
 	s64 acc = dsp_get_long_acc(dreg);
372 372
 	s64 ax = 0;
373  
-	switch(sreg) {
  373
+	switch (sreg) {
374 374
 	case DSP_REG_AXL0:
375 375
 	case DSP_REG_AXL1:
376 376
 		ax = (s16)g_dsp.r.ax[sreg-DSP_REG_AXL0].l;
@@ -569,7 +569,7 @@ void subr(const UDSPInstruction opc)
569 569
 
570 570
 	s64 acc = dsp_get_long_acc(dreg);
571 571
 	s64 ax = 0;
572  
-	switch(sreg) {
  572
+	switch (sreg) {
573 573
 	case DSP_REG_AXL0:
574 574
 	case DSP_REG_AXL1:
575 575
 		ax = (s16)g_dsp.r.ax[sreg-DSP_REG_AXL0].l;
@@ -745,7 +745,7 @@ void movr(const UDSPInstruction opc)
745 745
 	u8 sreg = ((opc >> 9) & 0x3) + DSP_REG_AXL0;
746 746
 
747 747
 	s64 ax = 0;
748  
-	switch(sreg)
  748
+	switch (sreg)
749 749
 	{
750 750
 	case DSP_REG_AXL0:
751 751
 	case DSP_REG_AXL1:
2  Source/Core/Core/DSP/Jit/DSPJitBranch.cpp
@@ -21,7 +21,7 @@ static void ReJitConditional(const UDSPInstruction opc, DSPEmitter& emitter)
21 21
 
22 22
 	emitter.dsp_op_read_reg(DSP_REG_SR, EAX);
23 23
 
24  
-	switch(cond)
  24
+	switch (cond)
25 25
 	{
26 26
 	case 0x0: // GE - Greater Equal
27 27
 	case 0x1: // L - Less
72  Source/Core/Core/DSP/Jit/DSPJitRegCache.cpp
@@ -10,7 +10,7 @@
10 10
 
11 11
 static void *reg_ptr(int reg)
12 12
 {
13  
-	switch(reg)
  13
+	switch (reg)
14 14
 	{
15 15
 	case DSP_REG_AR0:
16 16
 	case DSP_REG_AR1:
@@ -117,7 +117,7 @@ static void *reg_ptr(int reg)
117 117
 	xregs[R15].guest_reg = DSP_REG_NONE;
118 118
 #endif
119 119
 
120  
-	for(unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  120
+	for (unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
121 121
 	{
122 122
 		regs[i].mem = reg_ptr(i);
123 123
 		regs[i].size = 0;
@@ -130,7 +130,7 @@ static void *reg_ptr(int reg)
130 130
 		regs[i].loc = M(regs[i].mem);
131 131
 	}
132 132
 
133  
-	for(unsigned int i = 0; i < 32; i++)
  133
+	for (unsigned int i = 0; i < 32; i++)
134 134
 	{
135 135
 		regs[i].size = 2;
136 136
 	}
@@ -140,7 +140,7 @@ static void *reg_ptr(int reg)
140 140
 	regs[DSP_REG_ACC0_64].host_reg = R8;
141 141
 	regs[DSP_REG_ACC1_64].host_reg = R9;
142 142
 #endif
143  
-	for(unsigned int i = 0; i < 2; i++)
  143
+	for (unsigned int i = 0; i < 2; i++)
144 144
 	{
145 145
 		regs[i+DSP_REG_ACC0_64].size = 8;
146 146
 		regs[i+DSP_REG_ACL0].parentReg = i+DSP_REG_ACC0_64;
@@ -162,7 +162,7 @@ static void *reg_ptr(int reg)
162 162
 	regs[DSP_REG_PRODM2].shift = 48;
163 163
 #endif
164 164
 
165  
-	for(unsigned int i = 0; i < 2; i++)
  165
+	for (unsigned int i = 0; i < 2; i++)
166 166
 	{
167 167
 		regs[i+DSP_REG_AX0_32].size = 4;
168 168
 		regs[i+DSP_REG_AXL0].parentReg = i+DSP_REG_AX0_32;
@@ -209,7 +209,7 @@ void DSPJitRegCache::flushRegs(DSPJitRegCache &cache, bool emit)
209 209
 	size_t i;
210 210
 
211 211
 	// drop all guest register not used by cache
212  
-	for(i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  212
+	for (i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
213 213
 	{
214 214
 		regs[i].used = false; //used is restored later
215 215
 		if (regs[i].loc.IsSimpleReg() &&
@@ -224,7 +224,7 @@ void DSPJitRegCache::flushRegs(DSPJitRegCache &cache, bool emit)
224 224
 	do
225 225
 	{
226 226
 		movcnt = 0;
227  
-		for(i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  227
+		for (i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
228 228
 		{
229 229
 			X64Reg simple = regs[i].loc.GetSimpleReg();
230 230
 			X64Reg simple_cache = cache.regs[i].loc.GetSimpleReg();
@@ -238,7 +238,7 @@ void DSPJitRegCache::flushRegs(DSPJitRegCache &cache, bool emit)
238 238
 	} while (movcnt != 0);
239 239
 
240 240
 	// free all host regs that are not used for the same guest reg
241  
-	for(i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  241
+	for (i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
242 242
 	{
243 243
 		if (cache.regs[i].loc.GetSimpleReg() !=
244 244
 		    regs[i].loc.GetSimpleReg() &&
@@ -249,14 +249,14 @@ void DSPJitRegCache::flushRegs(DSPJitRegCache &cache, bool emit)
249 249
 	}
250 250
 
251 251
 	// load all guest regs that are in memory and should be in host reg
252  
-	for(i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  252
+	for (i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
253 253
 	{
254 254
 		if (cache.regs[i].loc.IsSimpleReg())
255 255
 		{
256 256
 			movToHostReg(i, cache.regs[i].loc.GetSimpleReg(), true);
257 257
 			rotateHostReg(i, cache.regs[i].shift, true);
258 258
 		}
259  
-		else if(cache.regs[i].loc.IsImm())
  259
+		else if (cache.regs[i].loc.IsImm())
260 260
 		{
261 261
 			// TODO: Immediates?
262 262
 		}
@@ -268,7 +268,7 @@ void DSPJitRegCache::flushRegs(DSPJitRegCache &cache, bool emit)
268 268
 
269 269
 	// sync the freely used xregs
270 270
 	if (!emit) {
271  
-		for(i = 0; i < NUMXREGS; i++)
  271
+		for (i = 0; i < NUMXREGS; i++)
272 272
 		{
273 273
 			if (cache.xregs[i].guest_reg == DSP_REG_USED &&
274 274
 			    xregs[i].guest_reg == DSP_REG_NONE)
@@ -284,14 +284,14 @@ void DSPJitRegCache::flushRegs(DSPJitRegCache &cache, bool emit)
284 284
 	}
285 285
 
286 286
 	// consistency checks
287  
-	for(i = 0; i < NUMXREGS; i++)
  287
+	for (i = 0; i < NUMXREGS; i++)
288 288
 	{
289 289
 		_assert_msg_(DSPLLE,
290 290
 			     xregs[i].guest_reg == cache.xregs[i].guest_reg,
291 291
 			     "cache and current xreg guest_reg mismatch for %zi", i);
292 292
 	}
293 293
 
294  
-	for(i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  294
+	for (i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
295 295
 	{
296 296
 		_assert_msg_(DSPLLE,
297 297
 			     regs[i].loc.IsImm() == cache.regs[i].loc.IsImm(),
@@ -319,7 +319,7 @@ void DSPJitRegCache::flushMemBackedRegs()
319 319
 	// this should have the same effect as
320 320
 	// merge(DSPJitRegCache(emitter));
321 321
 
322  
-	for(unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  322
+	for (unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
323 323
 	{
324 324
 		_assert_msg_(DSPLLE, !regs[i].used,
325 325
 			     "register %x still in use", i);
@@ -345,7 +345,7 @@ void DSPJitRegCache::flushRegs()
345 345
 {
346 346
 	flushMemBackedRegs();
347 347
 
348  
-	for(unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  348
+	for (unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
349 349
 	{
350 350
 		if (regs[i].host_reg != INVALID_REG)
351 351
 		{
@@ -353,7 +353,7 @@ void DSPJitRegCache::flushRegs()
353 353
 		}
354 354
 	}
355 355
 
356  
-	for(unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  356
+	for (unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
357 357
 	{
358 358
 		_assert_msg_(DSPLLE,
359 359
 		             !regs[i].loc.IsSimpleReg(),
@@ -418,7 +418,7 @@ void DSPJitRegCache::flushRegs()
418 418
 
419 419
 void DSPJitRegCache::loadRegs(bool emit)
420 420
 {
421  
-	for(unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  421
+	for (unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
422 422
 	{
423 423
 		if (regs[i].host_reg != INVALID_REG)
424 424
 		{
@@ -440,7 +440,7 @@ void DSPJitRegCache::saveRegs()
440 440
 {
441 441
 	flushRegs();
442 442
 
443  
-	for(unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  443
+	for (unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
444 444
 	{
445 445
 		if (regs[i].host_reg != INVALID_REG)
446 446
 		{
@@ -448,7 +448,7 @@ void DSPJitRegCache::saveRegs()
448 448
 		}
449 449
 	}
450 450
 
451  
-	for(unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  451
+	for (unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
452 452
 	{
453 453
 		_assert_msg_(DSPLLE,
454 454
 		             !regs[i].loc.IsSimpleReg(),
@@ -466,7 +466,7 @@ void DSPJitRegCache::pushRegs()
466 466
 {
467 467
 	flushMemBackedRegs();
468 468
 
469  
-	for(unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  469
+	for (unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
470 470
 	{
471 471
 		if (regs[i].host_reg != INVALID_REG)
472 472
 		{
@@ -494,7 +494,7 @@ void DSPJitRegCache::pushRegs()
494 494
 	}
495 495
 #endif
496 496
 
497  
-	for(unsigned int i = 0; i < NUMXREGS; i++)
  497
+	for (unsigned int i = 0; i < NUMXREGS; i++)
498 498
 	{
499 499
 		if (xregs[i].guest_reg == DSP_REG_USED)
500 500
 		{
@@ -504,14 +504,14 @@ void DSPJitRegCache::pushRegs()
504 504
 		}
505 505
 	}
506 506
 
507  
-	for(unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  507
+	for (unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
508 508
 	{
509 509
 		_assert_msg_(DSPLLE,
510 510
 		             !regs[i].loc.IsSimpleReg(),
511 511
 		             "register %x is still a simple reg", i);
512 512
 	}
513 513
 
514  
-	for(unsigned int i = 0; i < NUMXREGS; i++)
  514
+	for (unsigned int i = 0; i < NUMXREGS; i++)
515 515
 	{
516 516
 		_assert_msg_(DSPLLE,
517 517
 		             xregs[i].guest_reg == DSP_REG_NONE ||
@@ -541,7 +541,7 @@ void DSPJitRegCache::popRegs() {
541 541
 		}
542 542
 	}
543 543
 
544  
-	for(int i = NUMXREGS-1; i >= 0; i--)
  544
+	for (int i = NUMXREGS-1; i >= 0; i--)
545 545
 	{
546 546
 		if (xregs[i].pushed)
547 547
 		{
@@ -564,7 +564,7 @@ void DSPJitRegCache::popRegs() {
564 564
 	}
565 565
 #endif
566 566
 
567  
-	for(unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
  567
+	for (unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++)
568 568
 	{
569 569
 		if (regs[i].host_reg != INVALID_REG)
570 570
 		{
@@ -618,7 +618,7 @@ void DSPJitRegCache::movToHostReg(int reg, X64Reg host_reg, bool load)
618 618
 
619 619
 	if (load)
620 620
 	{
621  
-		switch(regs[reg].size)
  621
+		switch (regs[reg].size)
622 622
 		{
623 623
 		case 2:
624 624
 			emitter.MOV(16, R(host_reg), regs[reg].loc);
@@ -690,7 +690,7 @@ void DSPJitRegCache::rotateHostReg(int reg, int shift, bool emit)
690 690
 
691 691
 	if (shift > regs[reg].shift && emit)
692 692
 	{
693  
-		switch(regs[reg].size)
  693
+		switch (regs[reg].size)
694 694
 		{
695 695
 		case 2:
696 696
 			emitter.ROR(16, regs[reg].loc, Imm8(shift - regs[reg].shift));
@@ -707,7 +707,7 @@ void DSPJitRegCache::rotateHostReg(int reg, int shift, bool emit)
707 707
 	}
708 708
 	else if (shift < regs[reg].shift && emit)
709 709
 	{
710  
-		switch(regs[reg].size)
  710
+		switch (regs[reg].size)
711 711
 		{
712 712
 		case 2:
713 713
 			emitter.ROL(16, regs[reg].loc, Imm8(regs[reg].shift - shift));
@@ -762,7 +762,7 @@ void DSPJitRegCache::movToMemory(int reg)
762 762
 
763 763
 	if (regs[reg].dirty)
764 764
 	{
765  
-		switch(regs[reg].size)
  765
+		switch (regs[reg].size)
766 766
 		{
767 767
 		case 2:
768 768
 			emitter.MOV(16, tmp, regs[reg].loc);
@@ -835,7 +835,7 @@ void DSPJitRegCache::getReg(int reg, OpArg &oparg, bool load)
835 835
 	regs[real_reg].used = true;
836 836
 
837 837
 	//do some register specific fixup
838  
-	switch(reg)
  838
+	switch (reg)
839 839
 	{
840 840
 #if _M_X86_64
841 841
 	case DSP_REG_ACC0_64:
@@ -862,7 +862,7 @@ void DSPJitRegCache::putReg(int reg, bool dirty)
862 862
 
863 863
 	OpArg oparg = regs[real_reg].loc;
864 864
 
865  
-	switch(reg)
  865
+	switch (reg)
866 866
 	{
867 867
 	case DSP_REG_ACH0:
868 868
 	case DSP_REG_ACH1:
@@ -939,10 +939,10 @@ void DSPJitRegCache::readReg(int sreg, X64Reg host_dreg, DSPJitSignExtend extend
939 939
 	OpArg reg;
940 940
 	getReg(sreg, reg);
941 941
 
942  
-	switch(regs[sreg].size)
  942
+	switch (regs[sreg].size)
943 943
 	{
944 944
 	case 2:
945  
-		switch(extend)
  945
+		switch (extend)
946 946
 		{
947 947
 #if _M_X86_64
948 948
 		case SIGN:
@@ -966,7 +966,7 @@ void DSPJitRegCache::readReg(int sreg, X64Reg host_dreg, DSPJitSignExtend extend
966 966
 		break;
967 967
 	case 4:
968 968
 #if _M_X86_64
969  
-		switch(extend)
  969
+		switch (extend)
970 970
 		{
971 971
 		case SIGN:
972 972
 			emitter.MOVSX(64, 32, host_dreg, reg);
@@ -1000,7 +1000,7 @@ void DSPJitRegCache::writeReg(int dreg, OpArg arg)
1000 1000
 	getReg(dreg, reg, false);
1001 1001
 	if (arg.IsImm())
1002 1002
 	{
1003  
-		switch(regs[dreg].size)
  1003
+		switch (regs[dreg].size)
1004 1004
 		{
1005 1005
 		case 2:
1006 1006
 			emitter.MOV(16, reg, Imm16((u16) arg.offset));
@@ -1027,7 +1027,7 @@ void DSPJitRegCache::writeReg(int dreg, OpArg arg)
1027 1027
 	}
1028 1028
 	else
1029 1029
 	{
1030  
-		switch(regs[dreg].size)
  1030
+		switch (regs[dreg].size)
1031 1031
 		{
1032 1032
 		case 2:
1033 1033
 			emitter.MOV(16, reg, arg);
4  Source/Core/Core/DSP/Jit/DSPJitUtil.cpp
@@ -204,7 +204,7 @@ void DSPEmitter::dsp_op_read_reg_dont_saturate(int reg, Gen::X64Reg host_dreg, D
204 204
 	case DSP_REG_ST2:
205 205
 	case DSP_REG_ST3:
206 206
 		dsp_reg_load_stack(reg - DSP_REG_ST0, host_dreg);
207  
-		switch(extend)
  207
+		switch (extend)
208 208
 		{
209 209
 		case SIGN:
210 210
 #if _M_X86_64
@@ -240,7 +240,7 @@ void DSPEmitter::dsp_op_read_reg(int reg, Gen::X64Reg host_dreg, DSPJitSignExten
240 240
 	case DSP_REG_ST2:
241 241
 	case DSP_REG_ST3:
242 242
 		dsp_reg_load_stack(reg - DSP_REG_ST0, host_dreg);
243  
-		switch(extend)
  243
+		switch (extend)
244 244
 		{
245 245
 		case SIGN:
246 246
 #if _M_X86_64
8  Source/Core/Core/Debugger/PPCDebugInterface.cpp
@@ -128,14 +128,14 @@ void PPCDebugInterface::ClearAllMemChecks()
128 128
 
129 129
 bool PPCDebugInterface::IsMemCheck(unsigned int address)
130 130
 {
131  
-	return (Memory::AreMemoryBreakpointsActivated()
132  
-		&& PowerPC::memchecks.GetMemCheck(address));
  131
+	return (Memory::AreMemoryBreakpointsActivated() &&
  132
+	        PowerPC::memchecks.GetMemCheck(address));
133 133
 }
134 134
 
135 135
 void PPCDebugInterface::ToggleMemCheck(unsigned int address)
136 136
 {
137  
-	if (Memory::AreMemoryBreakpointsActivated()
138  
-		&& !PowerPC::memchecks.GetMemCheck(address))
  137
+	if (Memory::AreMemoryBreakpointsActivated() &&
  138
+	    !PowerPC::memchecks.GetMemCheck(address))
139 139
 	{
140 140
 		// Add Memory Check
141 141
 		TMemCheck MemCheck;
2  Source/Core/Core/FifoPlayer/FifoPlaybackAnalyzer.cpp
@@ -159,7 +159,7 @@ u32 FifoPlaybackAnalyzer::DecodeCommand(u8 *data)
159 159
 
160 160
 	int cmd = ReadFifo8(data);
161 161
 
162  
-	switch(cmd)
  162
+	switch (cmd)
163 163
 	{
164 164
 	case GX_NOP:
165 165
 	case 0x44:
2  Source/Core/Core/HLE/HLE_Misc.cpp
@@ -268,7 +268,7 @@ void HLEGeckoCodehandler()
268 268
 	{
269 269
 		return;
270 270
 	}
271  
-	else if(existing - magic > 5)
  271
+	else if (existing - magic > 5)
272 272
 	{
273 273
 		existing = magic;
274 274
 	}
20  Source/Core/Core/HLE/HLE_OS.cpp
@@ -32,9 +32,12 @@ void HLE_OSPanic()
32 32
 void HLE_GeneralDebugPrint()
33 33
 {
34 34
 	std::string ReportMessage;
35  
-	if(*(u32*)Memory::GetPointer(GPR(3)) > 0x80000000){
  35
+	if (*(u32*)Memory::GetPointer(GPR(3)) > 0x80000000)
  36
+	{
36 37
 		GetStringVA(ReportMessage, 4);
37  
-	}else{
  38
+	}
  39
+	else
  40
+	{
38 41
 		GetStringVA(ReportMessage);
39 42
 	}
40 43
 	NPC = LR;
@@ -50,7 +53,8 @@ void HLE_VPrintf()
50 53
 	u32 offset = Memory::Read_U32(r4+8);
51 54
 	u32 check = Memory::Read_U32(r4);
52 55
 	//NOTICE_LOG(OSREPORT, "Offset: %08X, Check %08X", offset, check);
53  
-	for(int i = 4; i<= 10; i++){
  56
+	for (int i = 4; i<= 10; i++)
  57
+	{
54 58
 		GPR(i) = Memory::Read_U32(offset+(i-(check == 0x01000000? 3 : 2))*4);
55 59
 		//NOTICE_LOG(OSREPORT, "r%d: %08X",i, GPR(i));
56 60
 	}
@@ -96,18 +100,18 @@ void GetStringVA(std::string& _rOutBuffer, u32 strReg)
96 100
 		return;
97 101
 	}
98 102
 
99  
-	while(*pString)
  103
+	while (*pString)
100 104
 	{
101 105
 		if (*pString == '%')
102 106
 		{
103 107
 			char* pArgument = ArgumentBuffer;
104 108
 			*pArgument++ = *pString++;
105  
-			if(*pString == '%') {
  109
+			if (*pString == '%') {
106 110
 				_rOutBuffer += "%";
107 111
 				pString++;
108 112
 				continue;
109 113
 			}
110  
-			while(*pString < 'A' || *pString > 'z' || *pString == 'l' || *pString == '-')
  114
+			while (*pString < 'A' || *pString > 'z' || *pString == 'l' || *pString == '-')
111 115
 				*pArgument++ = *pString++;
112 116
 
113 117
 			*pArgument++ = *pString;
@@ -130,7 +134,7 @@ void GetStringVA(std::string& _rOutBuffer, u32 strReg)
130 134
 			}
131 135
 			ParameterCounter++;
132 136
 
133  
-			switch(*pString)
  137
+			switch (*pString)
134 138
 			{
135 139
 			case 's':
136 140
 				_rOutBuffer += StringFromFormat(ArgumentBuffer, (char*)Memory::GetPointer((u32)Parameter));
@@ -170,7 +174,7 @@ void GetStringVA(std::string& _rOutBuffer, u32 strReg)
170 174
 			pString++;
171 175
 		}
172 176
 	}
173  
-	if(_rOutBuffer[_rOutBuffer.length() - 1] == '\n')
  177
+	if (_rOutBuffer[_rOutBuffer.length() - 1] == '\n')
174 178
 		_rOutBuffer.resize(_rOutBuffer.length() - 1);
175 179
 }
176 180
 
2  Source/Core/Core/HW/DSPHLE/DSPHLE.cpp
@@ -267,7 +267,7 @@ void DSPHLE::InitMixer()
267 267
 	AudioInterface::Callback_GetSampleRate(AISampleRate, DACSampleRate);
268 268
 	delete soundStream;
269 269
 	soundStream = AudioCommon::InitSoundStream(new HLEMixer(this, AISampleRate, DACSampleRate, 48000), m_hWnd);
270  
-	if(!soundStream) PanicAlert("Error starting up sound stream");
  270
+	if (!soundStream) PanicAlert("Error starting up sound stream");
271 271
 	// Mixer is initialized
272 272
 	m_InitMixer = true;
273 273
 }
6  Source/Core/Core/HW/DSPHLE/UCodes/UCode_Zelda_Synth.cpp
@@ -55,7 +55,7 @@ void CUCode_Zelda::RenderSynth_RectWave(ZeldaVoicePB &PB, s32* _Buffer, int _Siz
55 55
 		}
56 56
 	}
57 57
 
58  
-	while(i < _Size)
  58
+	while (i < _Size)
59 59
 	{
60 60
 		s16 sample = ((pos[1] & mask) == mask) ? 0xc000 : 0x4000;
61 61
 
@@ -131,7 +131,7 @@ void CUCode_Zelda::RenderSynth_WaveTable(ZeldaVoicePB &PB, s32* _Buffer, int _Si
131 131
 {
132 132
 	u16 address;
133 133
 
134  
-	switch(PB.Format)
  134
+	switch (PB.Format)
135 135
 	{
136 136
 	default:
137 137
 	case 0x0004:
@@ -161,7 +161,7 @@ void CUCode_Zelda::RenderSynth_WaveTable(ZeldaVoicePB &PB, s32* _Buffer, int _Si
161 161
 	address = AddValueToReg(address, ((ACC0 >> 16) & 0xffff));
162 162
 	ACC0 &= 0xffff0000ffffULL;
163 163
 
164  
-	for(int i = 0; i < 0x50; i++)
  164
+	for (int i = 0; i < 0x50; i++)
165 165
 	{
166 166
 		_Buffer[i] = m_MiscTable[address];
167 167
 
2  Source/Core/Core/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp
@@ -225,7 +225,7 @@ void PrintObject(const T &Obj)
225 225
 	ss << std::hex;
226 226
 	for (size_t i = 0; i < sizeof(T); i++)
227 227
 	{
228  
-		if((i & 1) == 0)
  228
+		if ((i & 1) == 0)
229 229
 			ss << ' ';
230 230
 		ss.width(2);
231 231
 		ss.fill('0');
2  Source/Core/Core/HW/DSPLLE/DSPLLE.cpp
@@ -185,7 +185,7 @@ void DSPLLE::InitMixer()
185 185
 	AudioInterface::Callback_GetSampleRate(AISampleRate, DACSampleRate);
186 186
 	delete soundStream;
187 187
 	soundStream = AudioCommon::InitSoundStream(new CMixer(AISampleRate, DACSampleRate, 48000), m_hWnd);
188  
-	if(!soundStream) PanicAlert("Error starting up sound stream");
  188
+	if (!soundStream) PanicAlert("Error starting up sound stream");
189 189
 	// Mixer is initialized
190 190
 	m_InitMixer = true;
191 191
 }
20  Source/Core/Core/HW/DVDInterface.cpp
@@ -521,7 +521,7 @@ void UpdateInterrupts()
521 521
 
522 522
 void GenerateDIInterrupt(DI_InterruptType _DVDInterrupt)
523 523
 {
524  
-	switch(_DVDInterrupt)
  524
+	switch (_DVDInterrupt)
525 525
 	{
526 526
 	case INT_DEINT:  m_DISR.DEINT   = 1; break;
527 527
 	case INT_TCINT:  m_DISR.TCINT   = 1; break;
@@ -535,9 +535,9 @@ void GenerateDIInterrupt(DI_InterruptType _DVDInterrupt)
535 535
 void ExecuteCommand(UDICR& _DICR)
536 536
 {
537 537
 	// _dbg_assert_(DVDINTERFACE, _DICR.RW == 0); // only DVD to Memory
538  
-	int GCAM = ((SConfig::GetInstance().m_SIDevice[0] == SIDEVICE_AM_BASEBOARD)
539  
-		&& (SConfig::GetInstance().m_EXIDevice[2] == EXIDEVICE_AM_BASEBOARD))
540  
-		? 1 : 0;
  538
+	int GCAM = ((SConfig::GetInstance().m_SIDevice[0] == SIDEVICE_AM_BASEBOARD) &&
  539
+	            (SConfig::GetInstance().m_EXIDevice[2] == EXIDEVICE_AM_BASEBOARD))
  540
+	           ? 1 : 0;
541 541
 
542 542
 	if (GCAM)
543 543
 	{
@@ -929,15 +929,15 @@ void ExecuteCommand(UDICR& _DICR)
929 929
 	// Just for fun
930 930
 	case 0xFF:
931 931
 		{
932  
-			if (m_DICMDBUF[0].Hex == 0xFF014D41
933  
-				&& m_DICMDBUF[1].Hex == 0x54534849
934  
-				&& m_DICMDBUF[2].Hex == 0x54410200)
  932
+			if (m_DICMDBUF[0].Hex == 0xFF014D41 &&
  933
+			    m_DICMDBUF[1].Hex == 0x54534849 &&
  934
+			    m_DICMDBUF[2].Hex == 0x54410200)
935 935
 			{
936 936
 				INFO_LOG(DVDINTERFACE, "Unlock test 1 passed");
937 937
 			}
938  
-			else if (m_DICMDBUF[0].Hex == 0xFF004456
939  
-				&& m_DICMDBUF[1].Hex == 0x442D4741
940  
-				&& m_DICMDBUF[2].Hex == 0x4D450300)
  938
+			else if (m_DICMDBUF[0].Hex == 0xFF004456 &&
  939
+			         m_DICMDBUF[1].Hex == 0x442D4741 &&
  940
+			         m_DICMDBUF[2].Hex == 0x4D450300)
941 941
 			{
942 942
 				INFO_LOG(DVDINTERFACE, "Unlock test 2 passed");
943 943
 			}
2  Source/Core/Core/HW/EXI.cpp
@@ -30,7 +30,7 @@ void Init()
30 30
 
31 31
 	if (Movie::IsPlayingInput() && Movie::IsUsingMemcard() && Movie::IsConfigSaved())
32 32
 		g_Channels[0]->AddDevice(EXIDEVICE_MEMORYCARD, 0); // SlotA
33  
-	else if(Movie::IsPlayingInput() && !Movie::IsUsingMemcard() && Movie::IsConfigSaved())
  33
+	else if (Movie::IsPlayingInput() && !Movie::IsUsingMemcard() && Movie::IsConfigSaved())
34 34
 		g_Channels[0]->AddDevice(EXIDEVICE_NONE,       0); // SlotA
35 35
 	else
36 36
 		g_Channels[0]->AddDevice(SConfig::GetInstance().m_EXIDevice[0], 0); // SlotA
8  Source/Core/Core/HW/EXI_Channel.cpp
@@ -137,7 +137,7 @@ void CEXIChannel::RegisterMMIO(MMIO::Mapping* mmio, u32 base)
137 137
 					m_Control.TSTART = 0;
138 138
 				}
139 139
 
140  
-				if(!m_Control.TSTART) // completed !
  140
+				if (!m_Control.TSTART) // completed !
141 141
 				{
142 142
 					m_Status.TCINT = 1;
143 143
 					CoreTiming::ScheduleEvent_Threadsafe_Immediate(updateInterrupts, 0);
@@ -171,7 +171,7 @@ void CEXIChannel::AddDevice(IEXIDevice* pDevice, const int device_num, bool noti
171 171
 	// replace it with the new one
172 172
 	m_pDevices[device_num].reset(pDevice);
173 173
 
174  
-	if(notifyPresenceChanged)
  174
+	if (notifyPresenceChanged)
175 175
 	{
176 176
 		// This means "device presence changed", software has to check
177 177
 		// m_Status.EXT to see if it is now present or not
@@ -241,13 +241,13 @@ void CEXIChannel::DoState(PointerWrap &p)
241 241
 		p.Do(type);
242 242
 		IEXIDevice* pSaveDevice = (type == pDevice->m_deviceType) ? pDevice : EXIDevice_Create(type, m_ChannelId);
243 243
 		pSaveDevice->DoState(p);
244  
-		if(pSaveDevice != pDevice)
  244
+		if (pSaveDevice != pDevice)
245 245
 		{
246 246
 			// if we had to create a temporary device, discard it if we're not loading.
247 247
 			// also, if no movie is active, we'll assume the user wants to keep their current devices
248 248
 			// instead of the ones they had when the savestate was created,
249 249
 			// unless the device is NONE (since ChangeDevice sets that temporarily).
250  
-			if(p.GetMode() != PointerWrap::MODE_READ)
  250
+			if (p.GetMode() != PointerWrap::MODE_READ)
251 251
 			{
252 252
 				delete pSaveDevice;
253 253
 			}
8  Source/Core/Core/HW/EXI_DeviceAD16.cpp
@@ -33,12 +33,12 @@ void CEXIAD16::TransferByte(u8& _byte)
33 33
 	}
34 34
 	else
35 35
 	{
36  
-		switch(m_uCommand)
  36
+		switch (m_uCommand)
37 37
 		{
38 38
 		case init:
39 39
 			{
40 40
 				m_uAD16Register.U32 = 0x04120000;
41  
-				switch(m_uPosition)
  41
+				switch (m_uPosition)
42 42
 				{
43 43
 				case 1: _dbg_assert_(EXPANSIONINTERFACE, (_byte == 0x00)); break; // just skip
44 44
 				case 2: _byte = m_uAD16Register.U8[0]; break;
@@ -51,7 +51,7 @@ void CEXIAD16::TransferByte(u8& _byte)
51 51
 
52 52
 		case write:
53 53
 			{
54  
-				switch(m_uPosition)
  54
+				switch (m_uPosition)
55 55
 				{
56 56
 				case 1: m_uAD16Register.U8[0] = _byte; break;
57 57
 				case 2: m_uAD16Register.U8[1] = _byte; break;
@@ -63,7 +63,7 @@ void CEXIAD16::TransferByte(u8& _byte)
63 63
 
64 64
 		case read:
65 65
 			{
66  
-				switch(m_uPosition)
  66
+				switch (m_uPosition)
67 67
 				{
68 68
 				case 1: _byte = m_uAD16Register.U8[0]; break;
69 69
 				case 2: _byte = m_uAD16Register.U8[1]; break;
6  Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp
@@ -134,7 +134,7 @@ void innerFlush(FlushData* data)
134 134
 // Flush memory card contents to disc
135 135
 void CEXIMemoryCard::Flush(bool exiting)
136 136
 {
137  
-	if(!m_bDirty)
  137
+	if (!m_bDirty)
138 138
 		return;
139 139
 
140 140
 	if (!Core::g_CoreStartupParameter.bEnableMemcardSaving)
@@ -145,7 +145,7 @@ void CEXIMemoryCard::Flush(bool exiting)
145 145
 		flushThread.join();
146 146
 	}
147 147
 
148  
-	if(!exiting)
  148
+	if (!exiting)
149 149
 		Core::DisplayMessage(StringFromFormat("Writing to memory card %c", card_index ? 'B' : 'A'), 1000);
150 150
 
151 151
 	flushData.filename = m_strFilename;
@@ -423,7 +423,7 @@ void CEXIMemoryCard::TransferByte(u8 &byte)
423 423
 				break;
424 424
 			}
425 425
 
426  
-			if(m_uPosition >= 5)
  426
+			if (m_uPosition >= 5)
427 427
 				programming_buffer[((m_uPosition - 5) & 0x7F)] = byte; // wrap around after 128 bytes
428 428
 
429 429
 			byte = 0xFF;
18  Source/Core/Core/HW/GCMemcard.cpp
@@ -155,7 +155,7 @@ static void ByteSwap(u8 *valueA, u8 *valueB)
155 155
 // the backup should be copied?
156 156
 //	}
157 157
 //
158  
-//	if(BE16(dir_backup.UpdateCounter) > BE16(dir.UpdateCounter)) //check if the backup is newer
  158
+//	if (BE16(dir_backup.UpdateCounter) > BE16(dir.UpdateCounter)) //check if the backup is newer
159 159
 //	{
160 160
 //		dir = dir_backup;
161 161
 //		bat = bat_backup; // needed?
@@ -348,7 +348,7 @@ u8 GCMemcard::TitlePresent(DEntry d) const
348 348
 		return DIRLEN;
349 349
 
350 350
 	u8 i = 0;
351  
-	while(i < DIRLEN)
  351
+	while (i < DIRLEN)
352 352
 	{
353 353
 		if ((BE32(CurrentDir->Dir[i].Gamecode) == BE32(d.Gamecode)) &&
354 354
 			(!memcmp(CurrentDir->Dir[i].Filename, d.Filename, 32)))
@@ -433,7 +433,7 @@ u32 GCMemcard::DEntry_ImageOffset(u8 index) const
433 433
 
434 434
 	int x = CurrentDir->Dir[index].IconFmt[0];
435 435
 	std::string format;
436  
-	for(int i = 0; i < 16; i++)
  436
+	for (int i = 0; i < 16; i++)
437 437
 	{
438 438
 		if (i == 8) x = CurrentDir->Dir[index].IconFmt[1];
439 439
 		format.push_back((x & 0x80) ? '1' : '0');
@@ -449,7 +449,7 @@ u32 GCMemcard::DEntry_ImageOffset(u8 index) const
449 449
 
450 450
 	int x = CurrentDir->Dir[index].AnimSpeed[0];
451 451
 	std::string speed;
452  
-	for(int i = 0; i < 16; i++)
  452
+	for (int i = 0; i < 16; i++)
453 453
 	{
454 454
 		if (i == 8) x = CurrentDir->Dir[index].AnimSpeed[1];
455 455
 		speed.push_back((x & 0x80) ? '1' : '0');
@@ -929,7 +929,7 @@ u32 GCMemcard::ExportGci(u8 index, const char *fileName, const std::string &dire
929 929
 
930 930
 	gci.Seek(0, SEEK_SET);
931 931
 
932  
-	switch(offset)
  932
+	switch (offset)
933 933
 	{
934 934
 	case GCS:
935 935
 		u8 gcsHDR[GCS];
@@ -964,7 +964,7 @@ u32 GCMemcard::ExportGci(u8 index, const char *fileName, const std::string &dire
964 964
 	std::vector<GCMBlock> saveData;
965 965
 	saveData.reserve(size);
966 966
 
967  
-	switch(GetSaveData(index, saveData))
  967
+	switch (GetSaveData(index, saveData))
968 968
 	{
969 969
 	case FAIL:
970 970
 		return FAIL;
@@ -985,7 +985,7 @@ u32 GCMemcard::ExportGci(u8 index, const char *fileName, const std::string &dire
985 985
 
986 986
 void GCMemcard::Gcs_SavConvert(DEntry &tempDEntry, int saveType, int length)
987 987
 {
988  
-	switch(saveType)
  988
+	switch (saveType)
989 989
 	{
990 990
 	case GCS:
991 991
 	{
@@ -1171,7 +1171,7 @@ u32 GCMemcard::ReadAnimRGBA8(u8 index, u32* buffer, u8 *delays) const
1171 1171
 			//Speed is set but there's no actual icon
1172 1172
 			//This is used to reduce animation speed in Pikmin and Luigi's Mansion for example
1173 1173
 			//These "blank frames" show the next icon
1174  
-			for(j=i; j<8;++j)
  1174
+			for (j=i; j<8;++j)
1175 1175
 			{
1176 1176
 				if (fmts[j] != 0)
1177 1177
 				{
@@ -1260,7 +1260,7 @@ void GCMemcard::FormatInternal(GCMC_Header &GCP)
1260 1260
 	u64 rand = CEXIIPL::GetGCTime();
1261 1261
 	p_hdr->formatTime = Common::swap64(rand);
1262 1262
 
1263  
-	for(int i = 0; i < 12; i++)
  1263
+	for (int i = 0; i < 12; i++)
1264 1264
 	{
1265 1265
 		rand = (((rand * (u64)0x0000000041c64e6dULL) + (u64)0x0000000000003039ULL) >> 16);
1266 1266
 		p_hdr->serial[i] = (u8)(g_SRAM.flash_id[0][i] + (u32)rand);
14  Source/Core/Core/HW/MemmapFunctions.cpp
@@ -629,14 +629,14 @@ u32 LookupTLBPageAddress(const XCheckTLBFlag _Flag, const u32 vpa, u32 *paddr)
629 629
 {
630 630
 #ifdef FAST_TLB_CACHE
631 631
 	tlb_entry *tlbe = tlb[_Flag == FLAG_OPCODE][(vpa>>HW_PAGE_INDEX_SHIFT)&HW_PAGE_INDEX_MASK];
632  
-	if(tlbe[0].tag == (vpa & ~0xfff) && !(tlbe[0].flags & TLB_FLAG_INVALID))
  632
+	if (tlbe[0].tag == (vpa & ~0xfff) && !(tlbe[0].flags & TLB_FLAG_INVALID))
633 633
 	{
634 634
 		tlbe[0].flags |= TLB_FLAG_MOST_RECENT;
635 635
 		tlbe[1].flags &= ~TLB_FLAG_MOST_RECENT;
636 636
 		*paddr = tlbe[0].paddr | (vpa & 0xfff);
637 637
 		return 1;
638 638
 	}
639  
-	if(tlbe[1].tag == (vpa & ~0xfff) && !(tlbe[1].flags & TLB_FLAG_INVALID))
  639
+	if (tlbe[1].tag == (vpa & ~0xfff) && !(tlbe[1].flags & TLB_FLAG_INVALID))
640 640
 	{
641 641
 		tlbe[1].flags |= TLB_FLAG_MOST_RECENT;
642 642
 		tlbe[0].flags &= ~TLB_FLAG_MOST_RECENT;
@@ -678,7 +678,7 @@ void UpdateTLBEntry(const XCheckTLBFlag _Flag, UPTE2 PTE2, const u32 vpa)
678 678
 {
679 679
 #ifdef FAST_TLB_CACHE
680 680
 	tlb_entry *tlbe = tlb[_Flag == FLAG_OPCODE][(vpa>>HW_PAGE_INDEX_SHIFT)&HW_PAGE_INDEX_MASK];
681  
-	if((tlbe[0].flags & TLB_FLAG_MOST_RECENT) == 0)
  681
+	if ((tlbe[0].flags & TLB_FLAG_MOST_RECENT) == 0)
682 682
 	{
683 683
 		tlbe[0].flags = TLB_FLAG_MOST_RECENT;
684 684
 		tlbe[1].flags &= ~TLB_FLAG_MOST_RECENT;
@@ -716,20 +716,20 @@ void InvalidateTLBEntry(u32 vpa)
716 716
 {
717 717
 #ifdef FAST_TLB_CACHE
718 718
 	tlb_entry *tlbe = tlb[0][(vpa>>HW_PAGE_INDEX_SHIFT)&HW_PAGE_INDEX_MASK];
719  
-	if(tlbe[0].tag == (vpa & ~0xfff))
  719
+	if (tlbe[0].tag == (vpa & ~0xfff))
720 720
 	{
721 721
 		tlbe[0].flags |= TLB_FLAG_INVALID;
722 722
 	}
723  
-	if(tlbe[1].tag == (vpa & ~0xfff))
  723
+	if (tlbe[1].tag == (vpa & ~0xfff))
724 724
 	{
725 725
 		tlbe[1].flags |= TLB_FLAG_INVALID;
726 726
 	}
727 727
 	tlb_entry *tlbe_i = tlb[1][(vpa>>HW_PAGE_INDEX_SHIFT)&HW_PAGE_INDEX_MASK];
728  
-	if(tlbe_i[0].tag == (vpa & ~0xfff))
  728
+	if (tlbe_i[0].tag == (vpa & ~0xfff))
729 729
 	{
730 730
 		tlbe_i[0].flags |= TLB_FLAG_INVALID;
731 731
 	}
732  
-	if(tlbe_i[1].tag == (vpa & ~0xfff))
  732
+	if (tlbe_i[1].tag == (vpa & ~0xfff))
733 733
 	{
734 734
 		tlbe_i[1].flags |= TLB_FLAG_INVALID;
735 735
 	}
10  Source/Core/Core/HW/SI.cpp
@@ -212,7 +212,7 @@ struct SSIChannel
212 212
 
213 213
 void DoState(PointerWrap &p)
214 214
 {
215  
-	for(int i = 0; i < MAX_SI_CHANNELS; i++)
  215
+	for (int i = 0; i < MAX_SI_CHANNELS; i++)
216 216
 	{
217 217
 		p.Do(g_Channel[i].m_InHi.Hex);
218 218
 		p.Do(g_Channel[i].m_InLo.Hex);
@@ -223,12 +223,12 @@ void DoState(PointerWrap &p)
223 223
 		p.Do(type);
224 224
 		ISIDevice* pSaveDevice = (type == pDevice->GetDeviceType()) ? pDevice : SIDevice_Create(type, i);
225 225
 		pSaveDevice->DoState(p);
226  
-		if(pSaveDevice != pDevice)
  226
+		if (pSaveDevice != pDevice)
227 227
 		{
228 228
 			// if we had to create a temporary device, discard it if we're not loading.
229 229
 			// also, if no movie is active, we'll assume the user wants to keep their current devices
230 230
 			// instead of the ones they had when the savestate was created.
231  
-			if(p.GetMode() != PointerWrap::MODE_READ ||
  231
+			if (p.GetMode() != PointerWrap::MODE_READ ||
232 232
 				(!Movie::IsRecordingInput() && !Movie::IsPlayingInput()))
233 233
 			{
234 234
 				delete pSaveDevice;
@@ -355,7 +355,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
355 355
 		MMIO::ComplexWrite<u32>([](u32, u32 val) {
356 356
 			USIStatusReg tmpStatus(val);
357 357
 
358  
-			// clear bits ( if(tmp.bit) SISR.bit=0 )
  358
+			// clear bits ( if (tmp.bit) SISR.bit=0 )
359 359
 			if (tmpStatus.NOREP0) g_StatusReg.NOREP0 = 0;
360 360
 			if (tmpStatus.COLL0)  g_StatusReg.COLL0 = 0;
361 361
 			if (tmpStatus.OVRUN0) g_StatusReg.OVRUN0 = 0;
@@ -422,7 +422,7 @@ void UpdateInterrupts()
422 422
 
423 423
 void GenerateSIInterrupt(SIInterruptType _SIInterrupt)
424 424
 {
425  
-	switch(_SIInterrupt)
  425
+	switch (_SIInterrupt)
426 426
 	{
427 427
 	case INT_RDSTINT: g_ComCSR.RDSTINT = 1; break;
428 428
 	case INT_TCINT:   g_ComCSR.TCINT = 1; break;
2  Source/Core/Core/HW/SI_Device.cpp
@@ -18,7 +18,7 @@ int ISIDevice::RunBuffer(u8* _pBuffer, int _iLength)
18 18
 
19 19
 	char szTemp[256] = "";
20 20
 	int num = 0;
21  
-	while(num < _iLength)
  21
+	while (num < _iLength)
22 22
 	{
23 23
 		char szTemp2[128] = "";
24 24
 		sprintf(szTemp2, "0x%02x ", _pBuffer[num^3]);
4  Source/Core/Core/HW/SI_DeviceAMBaseboard.cpp
@@ -90,14 +90,14 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
90 90
 	ISIDevice::RunBuffer(_pBuffer, _iLength);
91 91
 
92 92
 	int iPosition = 0;
93  
-	while(iPosition < _iLength)
  93
+	while (iPosition < _iLength)
94 94
 	{
95 95
 		// read the command
96 96
 		EBufferCommands command = static_cast<EBufferCommands>(_pBuffer[iPosition ^ 3]);
97 97
 		iPosition++;
98 98
 
99 99
 		// handle it
100  
-		switch(command)
  100
+		switch (command)
101 101
 		{
102 102
 		case CMD_RESET: // returns ID and dip switches
103 103
 			{
4  Source/Core/Core/HW/SI_DeviceDanceMat.cpp
@@ -122,12 +122,12 @@ bool CSIDevice_DanceMat::GetData(u32& _Hi, u32& _Low)
122 122
 
123 123
 	Movie::SetPolledDevice();
124 124
 
125  
-	if(Movie::IsPlayingInput())
  125
+	if (Movie::IsPlayingInput())
126 126
 	{
127 127
 		Movie::PlayController(&PadStatus, ISIDevice::m_iDeviceNumber);
128 128
 		Movie::InputUpdate();
129 129
 	}
130  
-	else if(Movie::IsRecordingInput())
  130
+	else if (Movie::IsRecordingInput())
131 131
 	{
132 132
 		Movie::RecordInput(&PadStatus, ISIDevice::m_iDeviceNumber);
133 133
 		Movie::InputUpdate();
4  Source/Core/Core/HW/SI_DeviceGCController.cpp
@@ -122,12 +122,12 @@ bool CSIDevice_GCController::GetData(u32& _Hi, u32& _Low)
122 122
 
123 123
 	Movie::SetPolledDevice();
124 124
 
125  
-	if(Movie::IsPlayingInput())
  125
+	if (Movie::IsPlayingInput())
126 126
 	{
127 127
 		Movie::PlayController(&PadStatus, ISIDevice::m_iDeviceNumber);
128 128
 		Movie::InputUpdate();
129 129
 	}
130  
-	else if(Movie::IsRecordingInput())
  130
+	else if (Movie::IsRecordingInput())
131 131
 	{
132 132
 		Movie::RecordInput(&PadStatus, ISIDevice::m_iDeviceNumber);
133 133
 		Movie::InputUpdate();
4  Source/Core/Core/HW/SI_DeviceGCSteeringWheel.cpp
@@ -113,12 +113,12 @@ bool CSIDevice_GCSteeringWheel::GetData(u32& _Hi, u32& _Low)
113 113
 
114 114
 	Movie::SetPolledDevice();
115 115
 
116  
-	if(Movie::IsPlayingInput())
  116
+	if (Movie::IsPlayingInput())
117 117
 	{
118 118
 		Movie::PlayController(&PadStatus, ISIDevice::m_iDeviceNumber);
119 119
 		Movie::InputUpdate();
120 120
 	}
121  
-	else if(Movie::IsRecordingInput())
  121
+	else if (Movie::IsRecordingInput())
122 122
 	{
123 123
 		Movie::RecordInput(&PadStatus, ISIDevice::m_iDeviceNumber);
124 124
 		Movie::InputUpdate();
2  Source/Core/Core/HW/Sram.cpp
@@ -78,7 +78,7 @@ void SetCardFlashID(u8* buffer, u8 card_index)
78 78
 {
79 79
 	u64 rand = Common::swap64( *(u64*)&(buffer[12]));
80 80
 	u8 csum=0;
81  
-	for(int i = 0; i < 12; i++)
  81
+	for (int i = 0; i < 12; i++)
82 82
 	{
83 83
 		rand = (((rand * (u64)0x0000000041c64e6dULL) + (u64)0x0000000000003039ULL) >> 16);
84 84
 		csum += g_SRAM.flash_id[card_index][i] = buffer[i] - ((u8)rand&0xff);
6  Source/Core/Core/HW/VideoInterface.cpp
@@ -515,7 +515,7 @@ static void BeginField(FieldType field)
515 515
 		// But the PAL ports of some games are poorly programmed and don't use correct ordering.
516 516
 		// Zelda: Wind Waker and Simpsons Hit & Run are exampes of this, there are probally more.
517 517
 		// PAL Wind Waker also runs at 30fps instead of 25.
518  
-		if(field == FieldType::FIELD_PROGRESSIVE || GetXFBAddressBottom() != (GetXFBAddressTop() - 1280))
  518
+		if (field == FieldType::FIELD_PROGRESSIVE || GetXFBAddressBottom() != (GetXFBAddressTop() - 1280))
519 519
 		{
520 520
 			WARN_LOG(VIDEOINTERFACE, "PAL game is trying to use incorrect (NTSC) field ordering");
521 521
 			// Lets kindly fix this for them.
@@ -523,7 +523,9 @@ static void BeginField(FieldType field)
523 523
 
524 524
 			// TODO: PAL Simpsons Hit & Run now has a green line at the bottom when Real XFB is used.
525 525
 			// Might be a bug later on in our code, or a bug in the actual game.
526  
-		} else {
  526
+		}
  527
+		else
  528
+		{
527 529
 			xfbAddr = GetXFBAddressBottom();
528 530
 		}
529 531
 	} else {
34  Source/Core/Core/HW/WiimoteEmu/EmuSubroutines.cpp
@@ -67,7 +67,7 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
67 67
 	u8 data[32] = {};
68 68
 	memcpy(data, data_, size_);
69 69
 
70  
-	switch(data[1])
  70
+	switch (data[1])
71 71
 	{
72 72
 	case WM_RUMBLE:
73 73
 		size = 1;
@@ -109,7 +109,7 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
109 109
 		u32 address = Common::swap24(wd->address);
110 110
 		address &= ~0x010000;
111 111
 
112  
-		switch(data[2] >> 0x01)
  112
+		switch (data[2] >> 0x01)
113 113
 		{
114 114
 		case WM_SPACE_EEPROM:
115 115
 			if (logCom) Name.append(" REG_EEPROM"); break;
@@ -120,16 +120,16 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
120 120
 			void *region_ptr = nullptr;
121 121
 			int region_size = 0;
122 122
 
123  
-			switch(data[3])
  123
+			switch (data[3])
124 124
 			{
125 125
 			case 0xa2:
126 126
 				if (logCom)
127 127
 				{
128 128
 					Name.append(" REG_SPEAKER");
129  
-					if(data[6] == 7)
  129
+					if (data[6] == 7)
130 130
 					{
131 131
 						//INFO_LOG(CONSOLE, "Sound configuration:");
132  
-						if(data[8] == 0x00)
  132
+						if (data[8] == 0x00)
133 133
 						{
134 134
 							//memcpy(&SampleValue, &data[9], 2);
135 135
 							//NOTICE_LOG(CONSOLE, "    Data format: 4-bit ADPCM (%i Hz)", 6000000 / SampleValue);
@@ -173,7 +173,7 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
173 173
 				memcpy((u8*)region_ptr + region_offset, wd->data, wd->size);
174 174
 			// save key
175 175
 			if (region_offset >= 0x40 && region_offset <= 0x4c) {
176  
-				if(!emu)
  176
+				if (!emu)
177 177
 					wiimote_gen_key(&wm->m_ext_key, wm->m_reg_ext.encryption_key);
178 178
 				INFO_LOG(CONSOLE, "Writing key: %s", ArrayToString((u8*)&wm->m_ext_key, sizeof(wm->m_ext_key), 0, 30).c_str());
179 179
 			}
@@ -204,7 +204,7 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
204 204
 
205 205
 		dataRep.push(((data[2]>>1)<<16) + ((data[3])<<8) + addressLO);
206 206
 
207  
-		switch(data[2]>>1)
  207
+		switch (data[2]>>1)
208 208
 		{
209 209
 		case WM_SPACE_EEPROM:
210 210
 			if (logCom) Name.append(" REG_EEPROM");
@@ -216,7 +216,7 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
216 216
 			// ignore second byte for extension area
217 217
 			if (address>>16 == 0xA4) address &= 0xFF00FF;
218 218
 			const u8 region_offset = (u8)address;
219  
-			switch(data[3])
  219
+			switch (data[3])
220 220
 			{
221 221
 			case 0xa2:
222 222
 				if (logCom) Name.append(" REG_SPEAKER");
@@ -300,7 +300,7 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
300 300
 		wm_read_data_reply* const rdr = (wm_read_data_reply*)(data2 + 2);
301 301
 
302 302
 		bool decrypted = false;
303  
-		if(!dataRep.empty())
  303
+		if (!dataRep.empty())
304 304
 		{
305 305
 			dataReply[0] = (dataRep.front()>>16)&0x00FF;
306 306
 			dataReply[1] = (dataRep.front()>>8)&0x00FF;
@@ -308,14 +308,14 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
308 308
 			dataRep.pop();
309 309
 		}
310 310
 
311  
-		switch(dataReply[0])
  311
+		switch (dataReply[0])
312 312
 		{
313 313
 		case WM_SPACE_EEPROM:
314 314
 			if (logCom)
315 315
 				Name.append(" REG_EEPROM");
316 316
 			// Wiimote calibration
317  
-			if(data[4] == 0xf0 && data[5] == 0x00 && data[6] == 0x10) {
318  
-				if(data[6] == 0x10) {
  317
+			if (data[4] == 0xf0 && data[5] == 0x00 && data[6] == 0x10) {
  318
+				if (data[6] == 0x10) {
319 319
 					accel_cal* calib = (accel_cal*)&rdr->data[6];
320 320
 					ERROR_LOG(CONSOLE, "Wiimote calibration:");
321 321
 					//SERROR_LOG(CONSOLE, "%s", ArrayToString(rdr->data, rdr->size).c_str());
@@ -334,7 +334,7 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
334 334
 
335 335
 		case WM_SPACE_REGS1:
336 336
 		case WM_SPACE_REGS2:
337  
-			switch(dataReply[1])
  337
+			switch (dataReply[1])
338 338
 			{
339 339
 			case 0xa2: if (logCom) Name.append(" REG_SPEAKER"); break;
340 340
 			case 0xa4: if (logCom) Name.append(" REG_EXT"); break;
@@ -387,7 +387,7 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
387 387
 		}
388 388
 
389 389
 		// Nunchuck calibration
390  
-		if(data[4] == 0xf0 && data[5] == 0x00 && (data[6] == 0x20 || data[6] == 0x30))
  390
+		if (data[4] == 0xf0 && data[5] == 0x00 && (data[6] == 0x20 || data[6] == 0x30))
391 391
 		{
392 392
 			// log
393 393
 			//TmpData = StringFromFormat("Read[%s] (enc): %s", (Emu ? "Emu" : "Real"), ArrayToString(data, size + 2).c_str());
@@ -435,7 +435,7 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
435 435
 			if (!emu)
436 436
 			{
437 437
 				// Save to registry
438  
-				if(data[7 + 0] != 0xff)
  438
+				if (data[7 + 0] != 0xff)
439 439
 				{
440 440
 					//memcpy((u8*)&wm->m_reg_ext.calibration, &data[7], 0x10);
441 441
 					//memcpy((u8*)&wm->m_reg_ext.unknown3, &data[7], 0x10);
@@ -448,7 +448,7 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
448 448
 				//WiimoteEmu::UpdateEeprom();
449 449
 			}
450 450
 			// third party Nunchuck
451  
-			else if(data[7] == 0xff)
  451
+			else if (data[7] == 0xff)
452 452
 			{
453 453
 				//memcpy(wm->m_reg_ext + 0x20, WiimoteEmu::wireless_nunchuck_calibration, sizeof(WiimoteEmu::wireless_nunchuck_calibration));
454 454
 				//memcpy(wm->m_reg_ext + 0x30, WiimoteEmu::wireless_nunchuck_calibration, sizeof(WiimoteEmu::wireless_nunchuck_calibration));
@@ -460,7 +460,7 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
460 460
 
461 461
 		if (dataReply[1] == 0xa4 || dataReply[1] == 0xa6)
462 462
 		{
463  
-			if(rdr->error == 7 || rdr->error == 8)
  463
+			if (rdr->error == 7 || rdr->error == 8)
464 464
 			{
465 465
 				WARN_LOG(CONSOLE, "R%s[0x%02x 0x%02x]: e-%d", decrypted?"*":"", dataReply[1], rdr->address>>8, rdr->error);
466 466
 			}
4  Source/Core/Core/HW/WiimoteEmu/Encryption.cpp
@@ -197,7 +197,7 @@ void genkey(const u8* const rand, const u8 idx, u8* const key)
197 197
 	const u8* const ans = ans_tbl[idx];
198 198
 	u8 t0[10];
199 199
 
200  
-	for(int i=0; i<10; ++i)
  200
+	for (int i=0; i<10; ++i)
201 201
 		t0[i] = tsbox[rand[i]];
202 202
 
203 203
 	key[0] = ((ror8((ans[0]^t0[5]),(t0[2]%8)) - t0[9]) ^ t0[4]);
@@ -249,7 +249,7 @@ void wiimote_gen_key(wiimote_key* const key, const u8* const keydata)
249 249
 	//DEBUG_LOG(WIIMOTE, "rand: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x", rand[0], rand[1], rand[2], rand[3], rand[4], rand[5], rand[6], rand[7], rand[8], rand[9]);
250 250
 	//DEBUG_LOG(WIIMOTE, "key:  %02x %02x %02x %02x %02x %02x", skey[0], skey[1], skey[2], skey[3], skey[4], skey[5]);
251 251
 
252  
-	for(idx = 0; idx < 7; ++idx)
  252
+	for (idx = 0; idx < 7; ++idx)
253 253
 	{
254 254
 		genkey(rand, idx, testkey);
255 255
 		if (0 == memcmp(testkey, skey, 6))
3  Source/Core/Core/HW/WiimoteEmu/Speaker.cpp
@@ -42,7 +42,8 @@ static s32 av_clip(s32 a, s32 amin, s32 amax)
42 42
 
43 43
 static s16 adpcm_yamaha_expand_nibble(ADPCMState& s, u8 nibble)
44 44
 {
45  
-	if(!s.step) {
  45
+	if (!s.step)
  46
+	{
46 47
 		s.predictor = 0;
47 48
 		s.step = 0;
48 49
 	}
4  Source/Core/Core/HW/WiimoteEmu/WiimoteEmu.cpp
@@ -339,7 +339,7 @@ bool Wiimote::Step()
339 339
 	m_rumble->controls[0]->control_ref->State(m_rumble_on);
340 340
 
341 341
 	// when a movie is active, this button status update is disabled (moved), because movies only record data reports.
342  
-	if(!(Movie::IsPlayingInput() || Movie::IsRecordingInput()) || NetPlay::IsNetPlayRunning())
  342
+	if (!(Movie::IsPlayingInput() || Movie::IsRecordingInput()) || NetPlay::IsNetPlayRunning())
343 343
 	{
344 344
 		UpdateButtonsStatus(has_focus);
345 345
 	}
@@ -397,7 +397,7 @@ void Wiimote::UpdateButtonsStatus(bool has_focus)
397 397
 void Wiimote::GetCoreData(u8* const data)
398 398
 {
399 399
 	// when a movie is active, the button update happens here instead of Wiimote::Step, to avoid potential desync issues.
400  
-	if(Movie::IsPlayingInput() || Movie::IsRecordingInput() || NetPlay::IsNetPlayRunning())
  400
+	if (Movie::IsPlayingInput() || Movie::IsRecordingInput() || NetPlay::IsNetPlayRunning())
401 401
 	{
402 402
 		UpdateButtonsStatus(HAS_FOCUS);
403 403
 	}
2  Source/Core/Core/HW/WiimoteReal/IONix.cpp
@@ -104,7 +104,7 @@ void WiimoteScanner::FindWiimotes(std::vector<Wiimote*> & found_wiimotes, Wiimot
104 104
 
105 105
 				auto* const wm = new Wiimote;
106 106
 				wm->bdaddr = scan_infos[i].bdaddr;
107  
-				if(IsBalanceBoardName(name))
  107
+				if (IsBalanceBoardName(name))
108 108
 				{
109 109
 					found_board = wm;
110 110
 					NOTICE_LOG(WIIMOTE, "Found balance board (%s).", bdaddr_str);
4  Source/Core/Core/HW/WiimoteReal/IOdarwin.mm
@@ -149,7 +149,7 @@ - (void) l2capChannelClosed: (IOBluetoothL2CAPChannel *) l2capChannel
149 149
 	{
150 150
 		CFRunLoopRun();
151 151
 	}
152  
-	while(!sbt->done);
  152
+	while (!sbt->done);
153 153
 
154 154
 	int found_devices = [[bti foundDevices] count];
155 155
 
@@ -166,7 +166,7 @@ - (void) l2capChannelClosed: (IOBluetoothL2CAPChannel *) l2capChannel
166 166
 		Wiimote *wm = new Wiimote();
167 167
 		wm->btd = [dev retain];
168 168
 		
169  
-		if(IsBalanceBoardName([[dev name] UTF8String]))
  169
+		if (IsBalanceBoardName([[dev name] UTF8String]))
170 170
 		{
171 171
 			found_board = wm;
172 172
 		}
33  Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp
@@ -179,9 +179,9 @@ void Wiimote::InterruptChannel(const u16 channel, const void* const _data, const
179 179
 			leds_rpt.leds = 0xf;
180 180
 		}
181 181
 	}
182  
-	else if (rpt[1] == WM_WRITE_SPEAKER_DATA
183  
-		&& (!SConfig::GetInstance().m_WiimoteEnableSpeaker
184  
-		|| (!wm->m_status.speaker || wm->m_speaker_mute)))
  182
+	else if (rpt[1] == WM_WRITE_SPEAKER_DATA &&
  183
+	         (!SConfig::GetInstance().m_WiimoteEnableSpeaker ||
  184
+	         (!wm->m_status.speaker || wm->m_speaker_mute)))
185 185
 	{
186 186
 		// Translate speaker data reports into rumble reports.
187 187
 		rpt[1] = WM_RUMBLE;
@@ -200,10 +200,14 @@ bool Wiimote::Read()
200 200
 
201 201
 	if (result > 0 && m_channel > 0)
202 202
 	{
203  
-		if (Core::g_CoreStartupParameter.iBBDumpPort > 0 && index == WIIMOTE_BALANCE_BOARD)
  203
+		if (Core::g_CoreStartupParameter.iBBDumpPort > 0 &&
  204
+		    index == WIIMOTE_BALANCE_BOARD)
204 205
 		{
205 206
 			static sf::SocketUDP Socket;
206  
-			Socket.Send((char*)rpt.data(), rpt.size(), sf::IPAddress::LocalHost, Core::g_CoreStartupParameter.iBBDumpPort);
  207
+			Socket.Send((char*)rpt.data(),
  208
+			            rpt.size(),
  209
+			            sf::IPAddress::LocalHost,
  210
+		                Core::g_CoreStartupParameter.iBBDumpPort);
207 211
 		}
208 212
 
209 213
 		// Add it to queue
@@ -321,10 +325,10 @@ bool Wiimote::PrepareOnThread()
321 325
 	u8 static const req_status_report[] = {WM_SET_REPORT | WM_BT_OUTPUT, WM_REQUEST_STATUS, 0};
322 326
 	// TODO: check for sane response?
323 327
 
324  
-	return (IOWrite(mode_report, sizeof(mode_report))
325  
-	        && IOWrite(led_report, sizeof(led_report))
326  
-	        && (SLEEP(200), IOWrite(rumble_report, sizeof(rumble_report)))
327  
-	        && IOWrite(req_status_report, sizeof(req_status_report)));
  328
+	return (IOWrite(mode_report, sizeof(mode_report)) &&
  329
+	        IOWrite(led_report, sizeof(led_report)) &&
  330
+	        (SLEEP(200), IOWrite(rumble_report, sizeof(rumble_report))) &&
  331
+	        IOWrite(req_status_report, sizeof(req_status_report)));
328 332
 }
329 333
 
330 334
 void Wiimote::EmuStart()
@@ -464,9 +468,9 @@ void WiimoteScanner::ThreadFunc()
464 468
 		// TODO: this is a fairly lame place for this
465 469
 		CheckForDisconnectedWiimotes();
466 470
 
467  
-		if(m_want_wiimotes)
  471
+		if (m_want_wiimotes)
468 472
 			HandleFoundWiimotes(found_wiimotes);
469  
-		if(m_want_bb && found_board)
  473
+		if (m_want_bb && found_board)
470 474
 			TryToConnectBalanceBoard(found_board);
471 475
 
472 476
 		//std::this_thread::yield();
@@ -596,7 +600,7 @@ void Initialize(bool wait)
596 600
 		g_wiimote_scanner.FindWiimotes(found_wiimotes, found_board);
597 601
 		if (SConfig::GetInstance().m_WiimoteContinuousScanning)
598 602
 		{
599  
-			while(CalculateWantedWiimotes() && CalculateConnectedWiimotes() < found_wiimotes.size() && timeout)
  603
+			while (CalculateWantedWiimotes() && CalculateConnectedWiimotes() < found_wiimotes.size() && timeout)
600 604
 			{
601 605
 				Common::SleepCurrentThread(100);
602 606
 				timeout--;
@@ -671,8 +675,7 @@ void ChangeWiimoteSource(unsigned int index, int source)
671 675
 
672 676
 static bool TryToConnectWiimoteN(Wiimote* wm, unsigned int i)
673 677
 {
674  
-	if (WIIMOTE_SRC_REAL & g_wiimote_sources[i]
675  
-		&& !g_wiimotes[i])
  678
+	if (WIIMOTE_SRC_REAL & g_wiimote_sources[i] && !g_wiimotes[i])
676 679
 	{
677 680
 		if (wm->Connect())
678 681
 		{
@@ -794,7 +797,7 @@ void Refresh()
794 797
 		}
795 798
 
796 799
 		HandleFoundWiimotes(found_wiimotes);
797  
-		if(found_board)
  800
+		if (found_board)
798 801
 			TryToConnectBalanceBoard(found_board);
799 802
 	}
800 803
 
21  Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_DI.cpp
@@ -93,7 +93,7 @@ bool CWII_IPC_HLE_Device_di::IOCtlV(u32 _CommandAddress)
93 93
 
94 94
 	// Prepare the out buffer(s) with zeros as a safety precaution
95 95
 	// to avoid returning bad values
96  
-	for(u32 i = 0; i < CommandBuffer.NumberPayloadBuffer; i++)
  96
+	for (u32 i = 0; i < CommandBuffer.NumberPayloadBuffer; i++)
97 97
 	{
98 98
 		Memory::Memset(CommandBuffer.PayloadBuffer[i].m_Address, 0,
99 99
 			CommandBuffer.PayloadBuffer[i].m_Size);
@@ -148,7 +148,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
148 148
 	}
149 149
 
150 150
 	// Initializing a filesystem if it was just loaded
151  
-	if(!m_pFileSystem && VolumeHandler::IsValid())
  151
+	if (!m_pFileSystem && VolumeHandler::IsValid())
152 152
 	{
153 153
 		m_pFileSystem = DiscIO::CreateFileSystem(VolumeHandler::GetVolume());
154 154
 		m_CoverStatus |= DI_COVER_REG_INITIALIZED;
@@ -156,7 +156,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
156 156
 	}
157 157
 
158 158
 	// De-initializing a filesystem if the volume was unmounted
159  
-	if(m_pFileSystem && !VolumeHandler::IsValid())
  159
+	if (m_pFileSystem && !VolumeHandler::IsValid())
160 160
 	{
161 161
 		delete m_pFileSystem;
162 162
 		m_pFileSystem = nullptr;
@@ -294,13 +294,12 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
294 294
 			// * 0x460a0000 - 0x460a0008
295 295
 			// * 0x7ed40000 - 0x7ed40008
296 296
 			u32 DVDAddress32 = Memory::Read_U32(_BufferIn + 0x08);
297  
-			if (!( (DVDAddress32 > 0x00000000 && DVDAddress32 < 0x00014000)
298  
-				|| (((DVDAddress32 + Size) > 0x00000000) && (DVDAddress32 + Size) < 0x00014000)
299  
-				|| (DVDAddress32 > 0x460a0000 && DVDAddress32 < 0x460a0008)
300  
-				|| (((DVDAddress32 + Size) > 0x460a0000) && (DVDAddress32 + Size) < 0x460a0008)
301  
-				|| (DVDAddress32 > 0x7ed40000 && DVDAddress32 < 0x7ed40008)
302  
-				|| (((DVDAddress32 + Size) > 0x7ed40000) && (DVDAddress32 + Size) < 0x7ed40008)
303  
-				))
  297
+			if (!((DVDAddress32 > 0x00000000 && DVDAddress32 < 0x00014000) ||
  298
+			      (((DVDAddress32 + Size) > 0x00000000) && (DVDAddress32 + Size) < 0x00014000) ||
  299
+			      (DVDAddress32 > 0x460a0000 && DVDAddress32 < 0x460a0008) ||
  300
+			      (((DVDAddress32 + Size) > 0x460a0000) && (DVDAddress32 + Size) < 0x460a0008) ||
  301
+			      (DVDAddress32 > 0x7ed40000 && DVDAddress32 < 0x7ed40008) ||
  302
+			      (((DVDAddress32 + Size) > 0x7ed40000) && (DVDAddress32 + Size) < 0x7ed40008)))
304 303
 			{
305 304
 				WARN_LOG(WII_IPC_DVD, "DVDLowUnencryptedRead: trying to read out of bounds @ %x", DVDAddress32);
306 305
 				m_ErrorStatus = ERROR_READY | ERROR_BLOCK_OOB;
@@ -317,7 +316,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
317 316
 				PanicAlertT("Detected attempt to read more data from the DVD than fit inside the out buffer. Clamp.");
318 317
 				Size = _BufferOutSize;
319 318
 			}
320  
-			if(!VolumeHandler::RAWReadToPtr(Memory::GetPointer(_BufferOut), DVDAddress, Size))
  319
+			if (!VolumeHandler::RAWReadToPtr(Memory::GetPointer(_BufferOut), DVDAddress, Size))
321 320
 			{
322 321
 				PanicAlertT("DVDLowUnencryptedRead - Fatal Error: failed to read from volume");
323 322
 			}
4  Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp
@@ -803,7 +803,7 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
803 803
 				TMDCnt += DiscIO::INANDContentLoader::TMD_HEADER_SIZE;
804 804
 				TMDCnt += (u32)Loader.GetContentSize() * DiscIO::INANDContentLoader::CONTENT_HEADER_SIZE;
805 805
 			}
806  
-			if(Buffer.NumberPayloadBuffer)
  806
+			if (Buffer.NumberPayloadBuffer)
807 807
 				Memory::Write_U32(TMDCnt, Buffer.PayloadBuffer[0].m_Address);
808 808
 
809 809
 			Memory::Write_U32(0, _CommandAddress + 0x4);
@@ -1151,7 +1151,7 @@ u32 CWII_IPC_HLE_Device_es::ES_DIVerify(u8* _pTMD, u32 _sz)
1151 1151
 		#endif
1152 1152
 	}
1153 1153
 
1154  
-	if(!File::Exists(tmdPath))
  1154
+	if (!File::Exists(tmdPath))
1155 1155
 	{
1156 1156
 		File::IOFile _pTMDFile(tmdPath, "wb");
1157 1157
 		if (!_pTMDFile.WriteBytes(_pTMD, _sz))
16  Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_fs.cpp
@@ -74,13 +74,13 @@ bool CWII_IPC_HLE_Device_fs::IOCtlV(u32 _CommandAddress)
74 74
 
75 75
 	// Prepare the out buffer(s) with zeros as a safety precaution
76 76
 	// to avoid returning bad values
77  
-	for(u32 i = 0; i < CommandBuffer.NumberPayloadBuffer; i++)
  77
+	for (u32 i = 0; i < CommandBuffer.NumberPayloadBuffer; i++)
78 78
 	{
79 79
 		Memory::Memset(CommandBuffer.PayloadBuffer[i].m_Address, 0,
80 80
 			CommandBuffer.PayloadBuffer[i].m_Size);
81 81
 	}
82 82
 
83  
-	switch(CommandBuffer.Parameter)
  83
+	switch (CommandBuffer.Parameter)
84 84
 	{
85 85
 	case IOCTLV_READ_DIR:
86 86
 		{
@@ -253,7 +253,7 @@ bool CWII_IPC_HLE_Device_fs::IOCtl(u32 _CommandAddress)
253 253
 
254 254
 s32 CWII_IPC_HLE_Device_fs::ExecuteCommand(u32 _Parameter, u32 _BufferIn, u32 _BufferInSize, u32 _BufferOut, u32 _BufferOutSize)
255 255
 {
256  
-	switch(_Parameter)
  256
+	switch (_Parameter)
257 257
 	{
258 258
 	case IOCTL_GET_STATS:
259 259
 		{
@@ -508,7 +508,7 @@ void CWII_IPC_HLE_Device_fs::DoState(PointerWrap& p)
508 508
 		File::CreateDir(Path.c_str());
509 509
 
510 510
 		//now restore from the stream
511  
-		while(1) {
  511
+		while (1) {
512 512
 			char type = 0;
513 513
 			p.Do(type);
514 514
 			if (!type)
@@ -516,7 +516,7 @@ void CWII_IPC_HLE_Device_fs::DoState(PointerWrap& p)
516 516
 			std::string filename;
517 517
 			p.Do(filename);
518 518
 			std::string name = Path + DIR_SEP + filename;
519  
-			switch(type)
  519
+			switch (type)
520 520
 			{
521 521
 			case 'd':
522 522
 			{
@@ -531,7 +531,7 @@ void CWII_IPC_HLE_Device_fs::DoState(PointerWrap& p)
531 531
 				File::IOFile handle(name, "wb");
532 532
 				char buf[65536];
533 533
 				u32 count = size;
534  
-				while(count > 65536) {
  534
+				while (count > 65536) {
535 535
 					p.DoArray(&buf[0], 65536);
536 536
 					handle.WriteArray(&buf[0], 65536);
537 537
 					count -= 65536;
@@ -553,7 +553,7 @@ void CWII_IPC_HLE_Device_fs::DoState(PointerWrap& p)
553 553
 		todo.insert(todo.end(), parentEntry.children.begin(),
554 554
 			    parentEntry.children.end());
555 555
 
556  
-		while(!todo.empty())
  556
+		while (!todo.empty())
557 557
 		{
558 558
 			File::FSTEntry &entry = todo.front();
559 559
 			std::string name = entry.physicalName;
@@ -574,7 +574,7 @@ void CWII_IPC_HLE_Device_fs::DoState(PointerWrap& p)
574 574
 				File::IOFile handle(entry.physicalName, "rb");
575 575
 				char buf[65536];
576 576
 				u32 count = size;
577  
-				while(count > 65536) {
  577
+				while (count > 65536) {
578 578
 					handle.ReadArray(&buf[0], 65536);
579 579
 					p.DoArray(&buf[0], 65536);
580 580
 					count -= 65536;
21  Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.cpp
@@ -390,7 +390,7 @@ void CWII_IPC_HLE_Device_hid::FillOutDevices(u32 BufferOut, u32 BufferOutSize)
390 390
 			struct libusb_config_descriptor *config = nullptr;
391 391
 			int cRet = libusb_get_config_descriptor(device, c, &config);
392 392
 			// do not try to use usb devices with more than one interface, games can crash
393  
-			if(cRet == 0 && config->bNumInterfaces <= MAX_HID_INTERFACES)
  393
+			if (cRet == 0 && config->bNumInterfaces <= MAX_HID_INTERFACES)
394 394
 			{
395 395
 				WiiHIDConfigDescriptor wii_config;
396 396
 				ConvertConfigToWii(&wii_config, config);
@@ -430,7 +430,7 @@ void CWII_IPC_HLE_Device_hid::FillOutDevices(u32 BufferOut, u32 BufferOutSize)
430 430
 			}
431 431
 			else
432 432
 			{
433  
-				if(cRet)
  433
+				if (cRet)
434 434
 					DEBUG_LOG(WII_IPC_HID, "libusb_get_config_descriptor failed with: %d", cRet);
435 435
 				deviceValid = false;
436 436
 				OffsetBuffer = OffsetStart;
@@ -471,7 +471,7 @@ void CWII_IPC_HLE_Device_hid::FillOutDevices(u32 BufferOut, u32 BufferOutSize)
471 471
 	for (i=0; i<MAX_DEVICE_DEVNUM; i++)
472 472
 	{
473 473
 		u16 check_cur = (u16)(hidDeviceAliases[i] >> 48);
474  
-		if(hidDeviceAliases[i] != 0 && check_cur != check)
  474
+		if (hidDeviceAliases[i] != 0 && check_cur != check)
475 475
 		{
476 476
 			DEBUG_LOG(WII_IPC_HID, "Removing: device %d %hX %hX", i, check, check_cur);
477 477
 			std::lock_guard<std::mutex> lk(s_open_devices);
@@ -505,7 +505,7 @@ libusb_device_handle * CWII_IPC_HLE_Device_hid::GetDeviceByDevNum(u32 devNum)
505 505
 	libusb_device_handle *handle = nullptr;
506 506
 	ssize_t cnt;
507 507
 
508  
-	if(devNum >= MAX_DEVICE_DEVNUM)
  508
+	if (devNum >= MAX_DEVICE_DEVNUM)
509 509
 		return nullptr;
510 510
 
511 511
 
@@ -514,7 +514,7 @@ libusb_device_handle * CWII_IPC_HLE_Device_hid::GetDeviceByDevNum(u32 devNum)
514 514
 	if (open_devices.find(devNum) != open_devices.end())
515 515
 	{
516 516
 		handle = open_devices[devNum];
517  
-		if(libusb_kernel_driver_active(handle, 0) != LIBUSB_ERROR_NO_DEVICE)
  517
+		if (libusb_kernel_driver_active(handle, 0) != LIBUSB_ERROR_NO_DEVICE)
518 518
 		{
519 519
 			return handle;
520 520
 		}
@@ -549,14 +549,15 @@ libusb_device_handle * CWII_IPC_HLE_Device_hid::GetDeviceByDevNum(u32 devNum)
549 549
 			{
550 550
 				if (ret == LIBUSB_ERROR_ACCESS)
551 551
 				{
552  
-					if( dRet )
  552
+					if (dRet)
553 553
 					{
554 554
 						ERROR_LOG(WII_IPC_HID, "Dolphin does not have access to this device: Bus %03d Device %03d: ID ????:???? (couldn't get id).",
555 555
 								bus,
556 556
 								port
557 557
 						);
558 558
 					}
559  
-					else{
  559
+					else
  560
+					{
560 561
 						ERROR_LOG(WII_IPC_HID, "Dolphin does not have access to this device: Bus %03d Device %03d: ID %04X:%04X.",
561 562
 								bus,
562 563
 								port,
@@ -568,7 +569,7 @@ libusb_device_handle * CWII_IPC_HLE_Device_hid::GetDeviceByDevNum(u32 devNum)
568 569
 #ifdef _WIN32
569 570
 				else if (ret == LIBUSB_ERROR_NOT_SUPPORTED)
570 571
 				{
571  
-					if(!has_warned_about_drivers)
  572
+					if (!has_warned_about_drivers)
572 573
 					{
573 574
 						// Max of one warning.
574 575
 						has_warned_about_drivers = true;
@@ -615,7 +616,7 @@ int CWII_IPC_HLE_Device_hid::GetAvaiableDevNum(u16 idVendor, u16 idProduct, u8 b
615 616
 	for (int i=0; i<MAX_DEVICE_DEVNUM; i++)
616 617
 	{
617 618
 		u64 id = hidDeviceAliases[i] & HID_ID_MASK;
618  
-		if(id == 0 && pos == -1)
  619
+		if (id == 0 && pos == -1)
619 620
 		{
620 621
 			pos = i;
621 622
 		}
@@ -626,7 +627,7 @@ int CWII_IPC_HLE_Device_hid::GetAvaiableDevNum(u16 idVendor, u16 idProduct, u8 b
626 627
 		}
627 628
 	}
628 629
 
629  
-	if(pos != -1)
  630
+	if (pos != -1)
630 631
 	{
631 632
 		hidDeviceAliases[pos] = unique_id | ((u64)check << 48);
632 633
 		return pos;
4  Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.h
@@ -198,7 +198,7 @@ class NWC24Config
198 198
 		SetEnableBooting(0);
199 199
 		SetEmail("@wii.com");
200 200
 
201  
-		for(i=0; i<nwc24_config_t::URL_COUNT; i++)
  201
+		for (i=0; i<nwc24_config_t::URL_COUNT; i++)
202 202
 		{
203 203
 			strncpy(config.http_urls[i], urls[i], nwc24_config_t::MAX_URL_LENGTH);
204 204
 		}
@@ -231,7 +231,7 @@ class NWC24Config
231 231
 			else
232 232
 			{
233 233
 				s32 config_error = CheckNwc24Config();
234  
-				if(config_error)
  234
+				if (config_error)
235 235
 					ERROR_LOG(WII_IPC_WC24, "There is an error in the config for for WC24: %d", config_error);
236 236
 			}
237 237
 		}
4  Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp
@@ -244,14 +244,14 @@ bool CWII_IPC_HLE_Device_sdio_slot0::IOCtlV(u32 _CommandAddress)
244 244
 
245 245
 	// Prepare the out buffer(s) with zeros as a safety precaution
246 246
 	// to avoid returning bad values
247  
-	for(u32 i = 0; i < CommandBuffer.NumberPayloadBuffer; i++)
  247
+	for (u32 i = 0; i < CommandBuffer.NumberPayloadBuffer; i++)
248 248
 	{
249 249
 		Memory::Memset(CommandBuffer.PayloadBuffer[i].m_Address, 0,
250 250
 			CommandBuffer.PayloadBuffer[i].m_Size);
251 251
 	}
252 252
 
253 253
 	u32 ReturnValue = 0;
254  
-	switch(CommandBuffer.Parameter) {
  254
+	switch (CommandBuffer.Parameter) {
255 255
 	case IOCTLV_SENDCMD:
256 256
 		INFO_LOG(WII_IPC_SD, "IOCTLV_SENDCMD 0x%08x", Memory::Read_U32(CommandBuffer.InBuffer[0].m_Address));
257 257
 		ReturnValue = ExecuteCommand(
2  Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_stm.h
@@ -66,7 +66,7 @@ class CWII_IPC_HLE_Device_stm_immediate : public IWII_IPC_HLE_Device
66 66
 		Memory::Memset(BufferOut, 0, BufferOutSize);
67 67
 		u32 ReturnValue = 0;
68 68
 
69  
-		switch(Parameter)
  69
+		switch (Parameter)
70 70
 		{
71 71
 		case IOCTL_STM_RELEASE_EH:
72 72
 			INFO_LOG(WII_IPC_STM, "%s - IOCtl:", GetDeviceName().c_str());
4  Source/Core/Core/IPC_HLE/WII_IPC_HLE_WiiMote.cpp
@@ -248,7 +248,7 @@ void CWII_IPC_HLE_WiiMote::ExecuteL2capCmd(u8* _pData, u32 _Size)
248 248
 	u32 DataSize = _Size - sizeof(l2cap_hdr_t);
249 249
 	INFO_LOG(WII_IPC_WIIMOTE, "  CID 0x%04x, Len 0x%x, DataSize 0x%x", pHeader->dcid, pHeader->length, DataSize);
250 250
 
251  
-	if(pHeader->length != DataSize)
  251
+	if (pHeader->length != DataSize)
252 252
 	{
253 253
 		INFO_LOG(WII_IPC_WIIMOTE, "Faulty packet. It is dropped.");
254 254
 		return;
@@ -776,7 +776,7 @@ void CWII_IPC_HLE_WiiMote::HandleSDP(u16 cid, u8* _pData, u32 _Size)
776 776
 
777 777
 	CBigEndianBuffer buffer(_pData);
778 778
 
779  
-	switch(buffer.Read8(0))
  779
+	switch (buffer.Read8(0))
780 780
 	{
781 781
 	// SDP_ServiceSearchRequest
782 782
 	case 0x02:
31  Source/Core/Core/IPC_HLE/WII_Socket.cpp
@@ -188,7 +188,7 @@ void WiiSocket::update(bool read, bool write, bool except)
188 188
 			u32 BufferOut = Memory::Read_U32(it->_CommandAddress + 0x18);
189 189
 			u32 BufferOutSize = Memory::Read_U32(it->_CommandAddress + 0x1C);
190 190
 
191  
-			switch(it->net_type)
  191
+			switch (it->net_type)
192 192
 			{
193 193
 			case IOCTL_SO_FCNTL:
194 194
 			{
@@ -261,8 +261,8 @@ void WiiSocket::update(bool read, bool write, bool except)
261 261
 			// Fix blocking error codes
262 262
 			if (!nonBlock)
263 263
 			{
264  
-				if (it->net_type == IOCTL_SO_CONNECT
265  
-					&& ReturnValue == -SO_EISCONN)
  264
+				if (it->net_type == IOCTL_SO_CONNECT &&
  265
+				    ReturnValue == -SO_EISCONN)
266 266
 				{
267 267
 					ReturnValue = SO_SUCCESS;
268 268
 				}
@@ -305,7 +305,7 @@ void WiiSocket::update(bool read, bool write, bool except)
305 305
 				int sslID = Memory::Read_U32(BufferOut) - 1;
306 306
 				if (SSLID_VALID(sslID))
307 307
 				{
308  
-					switch(it->ssl_type)
  308
+					switch (it->ssl_type)
309 309
 					{
310 310
 					case IOCTLV_NET_SSL_DOHANDSHAKE:
311 311
 					{
@@ -511,12 +511,19 @@ void WiiSocket::update(bool read, bool write, bool except)
511 511
 			}
512 512
 		}
513 513
 
514  
-		if ( nonBlock || forceNonBlock
515  
-			|| (!it->is_ssl && ReturnValue != -SO_EAGAIN && ReturnValue != -SO_EINPROGRESS && ReturnValue != -SO_EALREADY)
516  
-			|| (it->is_ssl && ReturnValue != SSL_ERR_WAGAIN && ReturnValue != SSL_ERR_RAGAIN))
  514
+		if (nonBlock ||
  515
+			forceNonBlock ||
  516
+		    (!it->is_ssl &&
  517
+		     ReturnValue != -SO_EAGAIN &&
  518
+		     ReturnValue != -SO_EINPROGRESS &&
  519
+		     ReturnValue != -SO_EALREADY) ||
  520
+		    (it->is_ssl &&
  521
+		     ReturnValue != SSL_ERR_WAGAIN &&
  522
+		     ReturnValue != SSL_ERR_RAGAIN))
517 523
 		{
518  
-			DEBUG_LOG(WII_IPC_NET, "IOCTL(V) Sock: %08x ioctl/v: %d returned: %d nonBlock: %d forceNonBlock: %d",
519  
-				fd, it->is_ssl ? (int) it->ssl_type : (int) it->net_type, ReturnValue, nonBlock, forceNonBlock);
  524
+			DEBUG_LOG(WII_IPC_NET,
  525
+			          "IOCTL(V) Sock: %08x ioctl/v: %d returned: %d nonBlock: %d forceNonBlock: %d",
  526
+			          fd, it->is_ssl ? (int) it->ssl_type : (int) it->net_type, ReturnValue, nonBlock, forceNonBlock);
520 527
 			WiiSockMan::EnqueueReply(it->_CommandAddress, ReturnValue);
521 528
 			it = pending_sockops.erase(it);
522 529
 		}
@@ -552,9 +559,9 @@ void WiiSockMan::addSocket(s32 fd)
552 559
 
553 560
 s32 WiiSockMan::newSocket(s32 af, s32 type, s32 protocol)
554 561
 {
555  
-	if (NetPlay::IsNetPlayRunning()
556  
-		|| Movie::IsRecordingInput()
557  
-		|| Movie::IsPlayingInput())
  562
+	if (NetPlay::IsNetPlayRunning() ||
  563
+	    Movie::IsRecordingInput() ||
  564
+	    Movie::IsPlayingInput())
558 565
 	{
559 566
 		return SO_ENOMEM;
560 567
 	}
127  Source/Core/Core/Movie.cpp
@@ -120,7 +120,7 @@ void EnsureTmpInputSize(size_t bound)
120 120
 void FrameUpdate()
121 121
 {
122 122
 	g_currentFrame++;
123  
-	if(!g_bPolled)
  123
+	if (!g_bPolled)
124 124
 		g_currentLagCount++;
125 125
 
126 126
 	if (IsRecordingInput())
@@ -139,7 +139,7 @@ void FrameUpdate()
139 139
 	if (g_bFrameStop)
140 140
 		*PowerPC::GetStatePtr() = PowerPC::CPU_STEPPING;
141 141
 
142  
-	if(g_framesToSkip)
  142
+	if (g_framesToSkip)
143 143
 		FrameSkipping();
144 144
 
145 145
 	g_bPolled = false;
@@ -222,14 +222,14 @@ void SetPolledDevice()
222 222
 
223 223
 void DoFrameStep()
224 224
 {
225  
-	if(Core::GetState() == Core::CORE_PAUSE)
  225
+	if (Core::GetState() == Core::CORE_PAUSE)
226 226
 	{
227 227
 		// if already paused, frame advance for 1 frame
228 228
 		Core::SetState(Core::CORE_RUN);
229 229
 		Core::RequestRefreshInfo();
230 230
 		g_bFrameStep = true;
231 231
 	}
232  
-	else if(!g_bFrameStep)
  232
+	else if (!g_bFrameStep)
233 233
 	{
234 234
 		// if not paused yet, pause immediately instead
235 235
 		Core::SetState(Core::CORE_PAUSE);
@@ -409,7 +409,7 @@ void ChangeWiiPads(bool instantly)
409 409
 
410 410
 bool BeginRecordingInput(int controllers)
411 411
 {
412  
-	if(g_playMode != MODE_NONE || controllers == 0)
  412
+	if (g_playMode != MODE_NONE || controllers == 0)
413 413
 		return false;
414 414
 
415 415
 	g_numPads = controllers;
@@ -432,7 +432,7 @@ bool BeginRecordingInput(int controllers)
432 432
 
433 433
 	if (Core::IsRunning())
434 434
 	{
435  
-		if(File::Exists(tmpStateFilename))
  435
+		if (File::Exists(tmpStateFilename))
436 436
 			File::Delete(tmpStateFilename);
437 437
 
438 438
 		State::SaveAs(tmpStateFilename.c_str());
@@ -463,16 +463,16 @@ bool BeginRecordingInput(int controllers)
463 463
 
464 464
 static void Analog2DToString(u8 x, u8 y, const char* prefix, char* str)
465 465
 {
466  
-	if((x <= 1 || x == 128 || x >= 255)
467  
-	&& (y <= 1 || y == 128 || y >= 255))
  466
+	if ((x <= 1 || x == 128 || x >= 255) &&
  467
+	    (y <= 1 || y == 128 || y >= 255))
468 468
 	{
469  
-		if(x != 128 || y != 128)
  469
+		if (x != 128 || y != 128)
470 470
 		{
471  
-			if(x != 128 && y != 128)
  471
+			if (x != 128 && y != 128)
472 472
 			{
473 473
 				sprintf(str, "%s:%s,%s", prefix, x<128?"LEFT":"RIGHT", y<128?"DOWN":"UP");
474 474
 			}
475  
-			else if(x != 128)
  475
+			else if (x != 128)
476 476
 			{
477 477
 				sprintf(str, "%s:%s", prefix, x<128?"LEFT":"RIGHT");
478 478
 			}
@@ -494,9 +494,9 @@ static void Analog2DToString(u8 x, u8 y, const char* prefix, char* str)
494 494
 
495 495
 static void Analog1DToString(u8 v, const char* prefix, char* str)
496 496
 {
497  
-	if(v > 0)
  497
+	if (v > 0)
498 498
 	{
499  
-		if(v == 255)
  499
+		if (v == 255)
500 500
 		{
501 501
 			strcpy(str, prefix);
502 502
 		}
@@ -517,26 +517,26 @@ void SetInputDisplayString(ControllerState padState, int controllerID)
517 517
 	sprintf(inp, "P%d:", controllerID + 1);
518 518
 	g_InputDisplay[controllerID] = inp;
519 519
 
520  
-	if(g_padState.A)
  520
+	if (g_padState.A)
521 521
 		g_InputDisplay[controllerID].append(" A");
522  
-	if(g_padState.B)
  522
+	if (g_padState.B)
523 523
 		g_InputDisplay[controllerID].append(" B");
524  
-	if(g_padState.X)
  524
+	if (g_padState.X)
525 525
 		g_InputDisplay[controllerID].append(" X");
526  
-	if(g_padState.Y)
  526
+	if (g_padState.Y)
527 527
 		g_InputDisplay[controllerID].append(" Y");
528  
-	if(g_padState.Z)
  528
+	if (g_padState.Z)
529 529
 		g_InputDisplay[controllerID].append(" Z");
530  
-	if(g_padState.Start)
  530
+	if (g_padState.Start)
531 531
 		g_InputDisplay[controllerID].append(" START");
532 532
 
533  
-	if(g_padState.DPadUp)
  533
+	if (g_padState.DPadUp)
534 534
 		g_InputDisplay[controllerID].append(" UP");
535  
-	if(g_padState.DPadDown)
  535
+	if (g_padState.DPadDown)
536 536
 		g_InputDisplay[controllerID].append(" DOWN");
537  
-	if(g_padState.DPadLeft)
  537
+	if (g_padState.DPadLeft)
538 538
 		g_InputDisplay[controllerID].append(" LEFT");
539  
-	if(g_padState.DPadRight)
  539
+	if (g_padState.DPadRight)
540 540
 		g_InputDisplay[controllerID].append(" RIGHT");
541 541
 
542 542
 	Analog1DToString(g_padState.TriggerL, " L", inp);
@@ -562,41 +562,41 @@ void SetWiiInputDisplayString(int remoteID, u8* const coreData, u8* const accelD
562 562
 	sprintf(inp, "R%d:", remoteID + 1);
563 563
 	g_InputDisplay[controllerID] = inp;
564 564
 
565  
-	if(coreData)
  565
+	if (coreData)
566 566
 	{
567 567
 		wm_core buttons = *(wm_core*)coreData;
568  
-		if(buttons & WiimoteEmu::Wiimote::PAD_LEFT)
  568
+		if (buttons & WiimoteEmu::Wiimote::PAD_LEFT)
569 569
 			g_InputDisplay[controllerID].append(" LEFT");
570  
-		if(buttons & WiimoteEmu::Wiimote::PAD_RIGHT)
  570
+		if (buttons & WiimoteEmu::Wiimote::PAD_RIGHT)
571 571
 			g_InputDisplay[controllerID].append(" RIGHT");
572  
-		if(buttons & WiimoteEmu::Wiimote::PAD_DOWN)
  572
+		if (buttons & WiimoteEmu::Wiimote::PAD_DOWN)
573 573
 			g_InputDisplay[controllerID].append(" DOWN");
574  
-		if(buttons & WiimoteEmu::Wiimote::PAD_UP)
  574
+		if (buttons & WiimoteEmu::Wiimote::PAD_UP)
575 575
 			g_InputDisplay[controllerID].append(" UP");
576  
-		if(buttons & WiimoteEmu::Wiimote::BUTTON_A)
  576
+		if (buttons & WiimoteEmu::Wiimote::BUTTON_A)
577 577
 			g_InputDisplay[controllerID].append(" A");
578  
-		if(buttons & WiimoteEmu::Wiimote::BUTTON_B)
  578
+		if (buttons & WiimoteEmu::Wiimote::BUTTON_B)
579 579
 			g_InputDisplay[controllerID].append(" B");
580  
-		if(buttons & WiimoteEmu::Wiimote::BUTTON_PLUS)
  580
+		if (buttons & WiimoteEmu::Wiimote::BUTTON_PLUS)
581 581
 			g_InputDisplay[controllerID].append(" +");
582  
-		if(buttons & WiimoteEmu::Wiimote::BUTTON_MINUS)
  582
+		if (buttons & WiimoteEmu::Wiimote::BUTTON_MINUS)
583 583
 			g_InputDisplay[controllerID].append(" -");
584  
-		if(buttons & WiimoteEmu::Wiimote::BUTTON_ONE)
  584
+		if (buttons & WiimoteEmu::Wiimote::BUTTON_ONE)
585 585
 			g_InputDisplay[controllerID].append(" 1");
586  
-		if(buttons & WiimoteEmu::Wiimote::BUTTON_TWO)
  586
+		if (buttons & WiimoteEmu::Wiimote::BUTTON_TWO)
587 587
 			g_InputDisplay[controllerID].append(" 2");
588  
-		if(buttons & WiimoteEmu::Wiimote::BUTTON_HOME)
  588
+		if (buttons & WiimoteEmu::Wiimote::BUTTON_HOME)
589 589
 			g_InputDisplay[controllerID].append(" HOME");
590 590
 	}
591 591
 
592  
-	if(accelData)
  592
+	if (accelData)
593 593
 	{
594 594
 		wm_accel* dt = (wm_accel*)accelData;
595 595
 		sprintf(inp, " ACC:%d,%d,%d", dt->x, dt->y, dt->z);
596 596
 		g_InputDisplay[controllerID].append(inp);
597 597
 	}
598 598
 
599  
-	if(irData) // incomplete
  599
+	if (irData) // incomplete
600 600
 	{
601 601
 		sprintf(inp, " IR:%d,%d", ((u8*)irData)[0], ((u8*)irData)[1]);
602 602
 		g_InputDisplay[controllerID].append(inp);
@@ -666,7 +666,7 @@ void CheckWiimoteStatus(int wiimote, u8 *data, const WiimoteEmu::ReportFeatures&
666 666
 
667 667
 void RecordWiimote(int wiimote, u8 *data, u8 size)
668 668
 {
669  
-	if(!IsRecordingInput() || !IsUsingWiimote(wiimote))
  669
+	if (!IsRecordingInput() || !IsUsingWiimote(wiimote))
670 670
 		return;
671 671
 
672 672
 	InputUpdate();
@@ -713,10 +713,10 @@ void ReadHeader()
713 713
 
714 714
 bool PlayInput(const char *filename)
715 715
 {
716  
-	if(!filename || g_playMode != MODE_NONE)
  716
+	if (!filename || g_playMode != MODE_NONE)
717 717
 		return false;
718 718
 
719  
-	if(!File::Exists(filename))
  719
+	if (!File::Exists(filename))
720 720
 		return false;
721 721
 
722 722
 	File::IOFile g_recordfd;
@@ -726,7 +726,10 @@ bool PlayInput(const char *filename)
726 726
 
727 727
 	g_recordfd.ReadArray(&tmpHeader, 1);
728 728
 
729  
-	if(tmpHeader.filetype[0] != 'D' || tmpHeader.filetype[1] != 'T' || tmpHeader.filetype[2] != 'M' || tmpHeader.filetype[3] != 0x1A) {
  729
+	if (tmpHeader.filetype[0] != 'D' ||
  730
+	    tmpHeader.filetype[1] != 'T' ||
  731
+	    tmpHeader.filetype[2] != 'M' ||
  732
+	    tmpHeader.filetype[3] != 0x1A) {
730 733
 		PanicAlertT("Invalid recording file");
731 734
 		goto cleanup;
732 735
 	}
@@ -748,10 +751,10 @@ bool PlayInput(const char *filename)
748 751
 	g_recordfd.Close();
749 752
 
750 753
 	// Load savestate (and skip to frame data)
751  
-	if(tmpHeader.bFromSaveState)
  754
+	if (tmpHeader.bFromSaveState)
752 755
 	{
753 756
 		const std::string stateFilename = std::string(filename) + ".sav";
754  
-		if(File::Exists(stateFilename))
  757
+		if (File::Exists(stateFilename))
755 758
 			Core::SetStateFileName(stateFilename);
756 759
 		g_bRecordingFromSaveState = true;
757 760
 		Movie::LoadInput(filename);
@@ -791,7 +794,7 @@ void LoadInput(const char *filename)
791 794
 
792 795
 	t_record.ReadArray(&tmpHeader, 1);
793 796
 
794  
-	if(tmpHeader.filetype[0] != 'D' || tmpHeader.filetype[1] != 'T' || tmpHeader.filetype[2] != 'M' || tmpHeader.filetype[3] != 0x1A)
  797
+	if (tmpHeader.filetype[0] != 'D' || tmpHeader.filetype[1] != 'T' || tmpHeader.filetype[2] != 'M' || tmpHeader.filetype[3] != 0x1A)
795 798
 	{
796 799
 		PanicAlertT("Savestate movie %s is corrupted, movie recording stopping...", filename);
797 800
 		EndPlayInput(false);
@@ -838,7 +841,7 @@ void LoadInput(const char *filename)
838 841
 		{
839 842
 			PanicAlertT("Warning: You loaded a save that's after the end of the current movie. (byte %u > %u) (frame %u > %u). You should load another save before continuing, or load this state with read-only mode off.", (u32)g_currentByte+256, (u32)g_totalBytes+256, (u32)g_currentFrame, (u32)g_totalFrames);
840 843
 		}
841  
-		else if(g_currentByte > 0 && g_totalBytes > 0)
  844
+		else if (g_currentByte > 0 && g_totalBytes > 0)
842 845
 		{
843 846
 			// verify identical from movie start to the save's current frame
844 847
 			u32 len = (u32)g_currentByte;
@@ -850,7 +853,7 @@ void LoadInput(const char *filename)
850 853
 				{
851 854
 					// this is a "you did something wrong" alert for the user's benefit.
852 855
 					// we'll try to say what's going on in excruciating detail, otherwise the user might not believe us.
853  
-					if(IsUsingWiimote(0))
  856
+					if (IsUsingWiimote(0))
854 857
 					{
855 858
 						// TODO: more detail
856 859
 						PanicAlertT("Warning: You loaded a save whose movie mismatches on byte %d (0x%X). You should load another save before continuing, or load this state with read-only mode off. Otherwise you'll probably get a desync.", i+256, i+256);
@@ -893,7 +896,7 @@ void LoadInput(const char *filename)
893 896
 	{
894 897
 		if (g_bReadOnly)
895 898
 		{
896  
-			if(g_playMode != MODE_PLAYING)
  899
+			if (g_playMode != MODE_PLAYING)
897 900
 			{
898 901
 				g_playMode = MODE_PLAYING;
899 902
 				Core::DisplayMessage("Switched to playback", 2000);
@@ -901,7 +904,7 @@ void LoadInput(const char *filename)
901 904
 		}
902 905
 		else
903 906
 		{
904  
-			if(g_playMode != MODE_RECORDING)
  907
+			if (g_playMode != MODE_RECORDING)
905 908
 			{
906 909
 				g_playMode = MODE_RECORDING;
907 910
 				Core::DisplayMessage("Switched to recording", 2000);
@@ -956,37 +959,37 @@ void PlayController(SPADStatus *PadStatus, int controllerID)
956 959
 
957 960
 	PadStatus->button |= PAD_USE_ORIGIN;
958 961
 
959  
-	if(g_padState.A)
  962
+	if (g_padState.A)
960 963
 	{
961 964
 		PadStatus->button |= PAD_BUTTON_A;
962 965
 		PadStatus->analogA = 0xFF;
963 966
 	}
964  
-	if(g_padState.B)
  967
+	if (g_padState.B)
965 968
 	{
966 969
 		PadStatus->button |= PAD_BUTTON_B;
967 970
 		PadStatus->analogB = 0xFF;
968 971
 	}
969  
-	if(g_padState.X)
  972
+	if (g_padState.X)
970 973
 		PadStatus->button |= PAD_BUTTON_X;
971  
-	if(g_padState.Y)
  974
+	if (g_padState.Y)
972 975
 		PadStatus->button |= PAD_BUTTON_Y;
973  
-	if(g_padState.Z)
  976
+	if (g_padState.Z)
974 977
 		PadStatus->button |= PAD_TRIGGER_Z;
975  
-	if(g_padState.Start)
  978
+	if (g_padState.Start)
976 979
 		PadStatus->button |= PAD_BUTTON_START;
977 980
 
978  
-	if(g_padState.DPadUp)
  981
+	if (g_padState.DPadUp)
979 982
 		PadStatus->button |= PAD_BUTTON_UP;
980  
-	if(g_padState.DPadDown)
  983
+	if (g_padState.DPadDown)
981 984
 		PadStatus->button |= PAD_BUTTON_DOWN;
982  
-	if(g_padState.DPadLeft)
  985
+	if (g_padState.DPadLeft)
983 986
 		PadStatus->button |= PAD_BUTTON_LEFT;
984  
-	if(g_padState.DPadRight)
  987
+	if (g_padState.DPadRight)
985 988
 		PadStatus->button |= PAD_BUTTON_RIGHT;
986 989
 
987  
-	if(g_padState.L)
  990
+	if (g_padState.L)
988 991
 		PadStatus->button |= PAD_TRIGGER_L;
989  
-	if(g_padState.R)
  992
+	if (g_padState.R)
990 993
 		PadStatus->button |= PAD_TRIGGER_R;
991 994
 	if (g_padState.disc)
992 995
 	{
@@ -1022,7 +1025,7 @@ void PlayController(SPADStatus *PadStatus, int controllerID)
1022 1025
 
1023 1026
 bool PlayWiimote(int wiimote, u8 *data, const WiimoteEmu::ReportFeatures& rptf, int irMode)
1024 1027
 {
1025  
-	if(!IsPlayingInput() || !IsUsingWiimote(wiimote) || tmpInput == nullptr)
  1028
+	if (!IsPlayingInput() || !IsUsingWiimote(wiimote) || tmpInput == nullptr)
1026 1029
 		return false;
1027 1030
 
1028 1031
 	if (g_currentByte > g_totalBytes)
@@ -1074,7 +1077,7 @@ void EndPlayInput(bool cont)
1074 1077
 		g_playMode = MODE_RECORDING;
1075 1078
 		Core::DisplayMessage("Reached movie end. Resuming recording.", 2000);
1076 1079
 	}
1077  
-	else if(g_playMode != MODE_NONE)
  1080
+	else if (g_playMode != MODE_NONE)
1078 1081
 	{
1079 1082
 		g_rerecords = 0;
1080 1083
 		g_currentByte = 0;
2  Source/Core/Core/NetPlayServer.cpp
@@ -697,7 +697,7 @@ bool NetPlayServer::UPnPMapPort(const std::string& addr, const u16 port)
697 697
 	                             (std::string("dolphin-emu TCP on ") + addr).c_str(),
698 698
 	                             "TCP", nullptr, nullptr);
699 699
 
700  
-	if(result != 0)
  700
+	if (result != 0)
701 701
 		return false;
702 702
 
703 703
 	m_upnp_mapped = port;
14  Source/Core/Core/PowerPC/GDBStub.cpp
@@ -116,7 +116,7 @@ static u8 gdb_calc_chksum()
116 116
 	u8 *ptr = cmd_bfr;
117 117
 	u8 c = 0;
118 118
 
119  
-	while(len-- > 0)
  119
+	while (len-- > 0)
120 120
 		c += *ptr++;
121 121
 
122 122
 	return c;
@@ -306,7 +306,7 @@ static void gdb_reply(const char *reply)
306 306
 	u8 *ptr;
307 307
 	int n;
308 308
 
309  
-	if(!gdb_active())
  309
+	if (!gdb_active())
310 310
 		return;
311 311
 
312 312
 	memset(cmd_bfr, 0, sizeof cmd_bfr);
@@ -329,7 +329,8 @@ static void gdb_reply(const char *reply)
329 329
 
330 330
 	ptr = cmd_bfr;
331 331
 	left = cmd_len + 4;
332  
-	while (left > 0) {
  332
+	while (left > 0)
  333
+	{
333 334
 		n = send(sock, ptr, left, 0);
334 335
 		if (n < 0)
335 336
 		{
@@ -719,14 +720,15 @@ static void gdb_remove_bp()
719 720
 
720 721
 void gdb_handle_exception()
721 722
 {
722  
-	while (gdb_active()) {
723  
-		if(!gdb_data_available())
  723
+	while (gdb_active())
  724
+	{
  725
+		if (!gdb_data_available())
724 726
 			continue;
725 727
 		gdb_read_command();
726 728
 		if (cmd_len == 0)
727 729
 			continue;
728 730
 
729  
-		switch(cmd_bfr[0]) {
  731
+		switch (cmd_bfr[0]) {
730 732
 			case 'q':
731 733
 				gdb_handle_query();
732 734
 				break;
20  Source/Core/Core/PowerPC/Interpreter/Interpreter_Integer.cpp
@@ -154,11 +154,11 @@ void Interpreter::twi(UGeckoInstruction _inst)
154 154
 
155 155
 	ERROR_LOG(POWERPC, "twi rA %x SIMM %x TO %0x", a, b, TO);
156 156
 
157  
-	if (   ((a < b) && (TO & 0x10))
158  
-		|| ((a > b) && (TO & 0x08))
159  
-		|| ((a ==b) && (TO & 0x04))
160  
-		|| (((u32)a <(u32)b) && (TO & 0x02))
161  
-		|| (((u32)a >(u32)b) && (TO & 0x01)))
  157
+	if (((a < b) && (TO & 0x10)) ||
  158
+	    ((a > b) && (TO & 0x08)) ||
  159
+	    ((a ==b) && (TO & 0x04)) ||
  160
+	    (((u32)a <(u32)b) && (TO & 0x02)) ||
  161
+	    (((u32)a >(u32)b) && (TO & 0x01)))
162 162
 	{
163 163
 		Common::AtomicOr(PowerPC::ppcState.Exceptions, EXCEPTION_PROGRAM);
164 164
 		PowerPC::CheckExceptions();
@@ -382,11 +382,11 @@ void Interpreter::tw(UGeckoInstruction _inst)
382 382
 
383 383
 	ERROR_LOG(POWERPC, "tw rA %0x rB %0x TO %0x", a, b, TO);
384 384
 
385  
-	if (   ((a < b) && (TO & 0x10))
386  
-		|| ((a > b) && (TO & 0x08))
387  
-		|| ((a ==b) && (TO & 0x04))
388  
-		|| (((u32)a <(u32)b) && (TO & 0x02))
389  
-		|| (((u32)a >(u32)b) && (TO & 0x01)))
  385
+	if (((a < b) && (TO & 0x10)) ||
  386
+	    ((a > b) && (TO & 0x08)) ||
  387
+	    ((a ==b) && (TO & 0x04)) ||
  388
+	    (((u32)a <(u32)b) && (TO & 0x02)) ||
  389
+	    (((u32)a >(u32)b) && (TO & 0x01)))
390 390
 	{
391 391
 		Common::AtomicOr(PowerPC::ppcState.Exceptions, EXCEPTION_PROGRAM);
392 392
 		PowerPC::CheckExceptions();
2  Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStorePaired.cpp
@@ -99,7 +99,7 @@ float Interpreter::Helper_Dequantize(const u32 _Addr, const EQuantizeType _quant
99 99
 {
100 100
 	// dequantize the value
101 101
 	float fResult;
102  
-	switch(_quantizeType)
  102
+	switch (_quantizeType)
103 103
 	{
104 104
 	case QUANTIZE_FLOAT:
105 105
 		{
2  Source/Core/Core/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp
@@ -253,7 +253,7 @@ void Interpreter::mtspr(UGeckoInstruction _inst)
253 253
 	//Our DMA emulation is highly inaccurate - instead of properly emulating the queue
254 254
 	//and so on, we simply make all DMA:s complete instantaneously.
255 255
 
256  
-	switch(iIndex)
  256
+	switch (iIndex)
257 257
 	{
258 258
 	case SPR_TL:
259 259
 	case SPR_TU:
2  Source/Core/Core/PowerPC/Jit64/Jit_Branch.cpp
@@ -132,7 +132,7 @@ void Jit64::bcx(UGeckoInstruction inst)
132 132
 		MOV(32, M(&LR), Imm32(js.compilerPC + 4));
133 133
 
134 134
 	u32 destination;
135  
-	if(inst.AA)
  135
+	if (inst.AA)
136 136
 		destination = SignExt16(inst.BD << 2);
137 137
 	else
138 138
 		destination = js.compilerPC + SignExt16(inst.BD << 2);
6  Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp
@@ -18,7 +18,7 @@ void Jit64::fp_tri_op(int d, int a, int b, bool reversible, bool single, void (X
18 18
 	if (d == a)
19 19
 	{
20 20
 		fpr.BindToRegister(d, true);
21  
-		if(!single)
  21
+		if (!single)
22 22
 		{
23 23
 			fpr.BindToRegister(b, true, false);
24 24
 		}
@@ -29,7 +29,7 @@ void Jit64::fp_tri_op(int d, int a, int b, bool reversible, bool single, void (X
29 29
 		if (reversible)
30 30
 		{
31 31
 			fpr.BindToRegister(d, true);
32  
-			if(!single)
  32
+			if (!single)
33 33
 			{
34 34
 				fpr.BindToRegister(a, true, false);
35 35
 			}
@@ -47,7 +47,7 @@ void Jit64::fp_tri_op(int d, int a, int b, bool reversible, bool single, void (X
47 47
 	{
48 48
 		// Sources different from d, can use rather quick solution
49 49
 		fpr.BindToRegister(d, !single);
50  
-		if(!single)
  50
+		if (!single)
51 51
 		{
52 52
 			fpr.BindToRegister(b, true, false);
53 53
 		}
20  Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
@@ -135,12 +135,12 @@ void Jit64::GenerateRC()
135 135
 
136 136
 void Jit64::ComputeRC(const Gen::OpArg & arg)
137 137
 {
138  
-	if( arg.IsImm() )
  138
+	if (arg.IsImm())
139 139
 	{
140 140
 		s32 value = (s32)arg.offset;
141  
-		if( value < 0 )
  141
+		if (value < 0)
142 142
 			MOV(8, M(&PowerPC::ppcState.cr_fast[0]), Imm8(0x8));
143  
-		else if( value > 0 )
  143
+		else if (value > 0)
144 144
 			MOV(8, M(&PowerPC::ppcState.cr_fast[0]), Imm8(0x4));
145 145
 		else
146 146
 			MOV(8, M(&PowerPC::ppcState.cr_fast[0]), Imm8(0x2));
@@ -1102,13 +1102,13 @@ void Jit64::mulli(UGeckoInstruction inst)
1102 1102
 		{
1103 1103
 			XOR(32, gpr.R(d), gpr.R(d));
1104 1104
 		}
1105  
-		else if(imm == (u32)-1)
  1105
+		else if (imm == (u32)-1)
1106 1106
 		{
1107 1107
 			if (d != a)
1108 1108
 				MOV(32, gpr.R(d), gpr.R(a));
1109 1109
 			NEG(32, gpr.R(d));
1110 1110
 		}
1111  
-		else if((imm & (imm - 1)) == 0)
  1111
+		else if ((imm & (imm - 1)) == 0)
1112 1112
 		{
1113 1113
 			u32 shift = 0;
1114 1114
 			if (imm & 0xFFFF0000) shift |= 16;
@@ -1157,13 +1157,13 @@ void Jit64::mullwx(UGeckoInstruction inst)
1157 1157
 			{
1158 1158
 				XOR(32, gpr.R(d), gpr.R(d));
1159 1159
 			}
1160  
-			else if(imm == (u32)-1)
  1160
+			else if (imm == (u32)-1)
1161 1161
 			{
1162 1162
 				if (d != src)
1163 1163
 					MOV(32, gpr.R(d), gpr.R(src));
1164 1164
 				NEG(32, gpr.R(d));
1165 1165
 			}
1166  
-			else if((imm & (imm - 1)) == 0 && !inst.OE)
  1166
+			else if ((imm & (imm - 1)) == 0 && !inst.OE)
1167 1167
 			{
1168 1168
 				u32 shift = 0;
1169 1169
 				if (imm & 0xFFFF0000) shift |= 16;
@@ -1245,7 +1245,7 @@ void Jit64::divwux(UGeckoInstruction inst)
1245 1245
 
1246 1246
 	if (gpr.R(a).IsImm() && gpr.R(b).IsImm())
1247 1247
 	{
1248  
-		if( gpr.R(b).offset == 0 )
  1248
+		if (gpr.R(b).offset == 0)
1249 1249
 		{
1250 1250
 			gpr.SetImmediate32(d, 0);
1251 1251
 			if (inst.OE)
@@ -1276,7 +1276,7 @@ void Jit64::divwux(UGeckoInstruction inst)
1276 1276
 		else
1277 1277
 		{
1278 1278
 			u32 shift = 31;
1279  
-			while(!(divisor & (1 << shift)))
  1279
+			while (!(divisor & (1 << shift)))
1280 1280
 				shift--;
1281 1281
 
1282 1282
 			if (divisor == (u32)(1 << shift))
@@ -1403,7 +1403,7 @@ void Jit64::divwx(UGeckoInstruction inst)
1403 1403
 	if (gpr.R(a).IsImm() && gpr.R(b).IsImm())
1404 1404
 	{
1405 1405
 		s32 i = (s32)gpr.R(a).offset, j = (s32)gpr.R(b).offset;
1406  
-		if( j == 0 || (i == (s32)0x80000000 && j == -1))
  1406
+		if (j == 0 || (i == (s32)0x80000000 && j == -1))
1407 1407
 		{
1408 1408
 			gpr.SetImmediate32(d, (i >> 31) ^ j);
1409 1409
 			if (inst.OE)
2  Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp
@@ -262,7 +262,7 @@ void Jit64::crXXX(UGeckoInstruction inst)
262 262
 		SHR(8, R(ECX), Imm8(shiftB));
263 263
 
264 264
 	// Compute combined bit
265  
-	switch(inst.SUBOP10)
  265
+	switch (inst.SUBOP10)
266 266
 	{
267 267
 	case 33:  // crnor
268 268
 		OR(8, R(EAX), R(ECX));
16  Source/Core/Core/PowerPC/JitArm32/Jit.cpp
@@ -132,7 +132,7 @@ void JitArm::DoDownCount()
132 132
 	ARMReg rB = gpr.GetReg();
133 133
 	MOVI2R(rA, (u32)&CoreTiming::downcount);
134 134
 	LDR(rB, rA);
135  
-	if(js.downcountAmount < 255) // We can enlarge this if we used rotations
  135
+	if (js.downcountAmount < 255) // We can enlarge this if we used rotations
136 136
 	{
137 137
 		SUBS(rB, rB, js.downcountAmount);
138 138
 		STR(rB, rA);
@@ -257,19 +257,19 @@ void JitArm::PrintDebug(UGeckoInstruction inst, u32 level)
257 257
 		printf("\tOuts\n");
258 258
 		if (Info->flags & FL_OUT_A)
259 259
 			printf("\t-OUT_A: %x\n", inst.RA);
260  
-		if(Info->flags & FL_OUT_D)
  260
+		if (Info->flags & FL_OUT_D)
261 261
 			printf("\t-OUT_D: %x\n", inst.RD);
262 262
 		printf("\tIns\n");
263 263
 		// A, AO, B, C, S
264  
-		if(Info->flags & FL_IN_A)
  264
+		if (Info->flags & FL_IN_A)
265 265
 			printf("\t-IN_A: %x\n", inst.RA);
266  
-		if(Info->flags & FL_IN_A0)
  266
+		if (Info->flags & FL_IN_A0)
267 267
 			printf("\t-IN_A0: %x\n", inst.RA);
268  
-		if(Info->flags & FL_IN_B)
  268
+		if (Info->flags & FL_IN_B)
269 269
 			printf("\t-IN_B: %x\n", inst.RB);
270  
-		if(Info->flags & FL_IN_C)
  270
+		if (Info->flags & FL_IN_C)
271 271
 			printf("\t-IN_C: %x\n", inst.RC);
272  
-		if(Info->flags & FL_IN_S)
  272
+		if (Info->flags & FL_IN_S)
273 273
 			printf("\t-IN_S: %x\n", inst.RS);
274 274
 	}
275 275
 }
@@ -364,7 +364,7 @@ const u8* JitArm::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBlo
364 364
 	const u8 *normalEntry = GetCodePtr();
365 365
 	b->normalEntry = normalEntry;
366 366
 
367  
-	if(ImHereDebug)
  367
+	if (ImHereDebug)
368 368
 		QuickCallFunction(R14, (void *)&ImHere); //Used to get a trace of the last few blocks before a crash, sometimes VERY useful
369 369
 
370 370
 	if (js.fpa.any)
4  Source/Core/Core/PowerPC/JitArm32/JitArm_Branch.cpp
@@ -192,7 +192,7 @@ void JitArm::bcx(UGeckoInstruction inst)
192 192
 	gpr.Unlock(rA, rB);
193 193
 
194 194
 	u32 destination;
195  
-	if(inst.AA)
  195
+	if (inst.AA)
196 196
 		destination = SignExt16(inst.BD << 2);
197 197
 	else
198 198
 		destination = js.compilerPC + SignExt16(inst.BD << 2);
@@ -223,7 +223,7 @@ void JitArm::bcctrx(UGeckoInstruction inst)
223 223
 		//NPC = CTR & 0xfffffffc;
224 224
 		ARMReg rA = gpr.GetReg();
225 225
 
226  
-		if(inst.LK_3)
  226
+		if (inst.LK_3)
227 227
 		{
228 228
 			u32 Jumpto = js.compilerPC + 4;
229 229
 			MOVI2R(rA, Jumpto);
2  Source/Core/Core/PowerPC/JitArm32/JitArm_FPUtils.h
@@ -31,7 +31,7 @@
31 31
 inline void JitArm::SetFPException(ARMReg Reg, u32 Exception)
32 32
 {
33 33
 	Operand2 *ExceptionMask;
34  
-	switch(Exception)
  34
+	switch (Exception)
35 35
 	{
36 36
 		case FPSCR_VXCVI:
37 37
 			ExceptionMask = &CVIException;
10  Source/Core/Core/PowerPC/JitArm32/JitArm_Integer.cpp
@@ -283,7 +283,7 @@ void JitArm::arith(UGeckoInstruction inst)
283 283
 		break;
284 284
 
285 285
 		case 31: // addcx, addx, subfx
286  
-			switch(inst.SUBOP10)
  286
+			switch (inst.SUBOP10)
287 287
 			{
288 288
 				case 24: // slwx
289 289
 				case 28: // andx
@@ -341,7 +341,7 @@ void JitArm::arith(UGeckoInstruction inst)
341 341
 	{
342 342
 		bool hasCarry = false;
343 343
 		u32 dest = d;
344  
-		switch(inst.OPCD)
  344
+		switch (inst.OPCD)
345 345
 		{
346 346
 			case 7:
347 347
 				gpr.SetImmediate(d, Mul(Imm[0], Imm[1]));
@@ -372,7 +372,7 @@ void JitArm::arith(UGeckoInstruction inst)
372 372
 				dest = a;
373 373
 			break;
374 374
 			case 31: // addcx, addx, subfx
375  
-				switch(inst.SUBOP10)
  375
+				switch (inst.SUBOP10)
376 376
 				{
377 377
 					case 24:
378 378
 						gpr.SetImmediate(a, Imm[0] << Imm[1]);
@@ -439,7 +439,7 @@ void JitArm::arith(UGeckoInstruction inst)
439 439
 		return;
440 440
 	}
441 441
 	// One or the other isn't a IMM
442  
-	switch(inst.OPCD)
  442
+	switch (inst.OPCD)
443 443
 	{
444 444
 		case 7:
445 445
 		{
@@ -511,7 +511,7 @@ void JitArm::arith(UGeckoInstruction inst)
511 511
 		}
512 512
 		break;
513 513
 		case 31:
514  
-			switch(inst.SUBOP10)
  514
+			switch (inst.SUBOP10)
515 515
 			{
516 516
 				case 24:
517 517
 					RA = gpr.R(a);
8  Source/Core/Core/PowerPC/JitArm32/JitArm_LoadStore.cpp
@@ -89,7 +89,7 @@ void JitArm::SafeStoreFromReg(bool fastmem, s32 dest, u32 value, s32 regOffset,
89 89
 	if (regOffset != -1)
90 90
 		RB = gpr.R(regOffset);
91 91
 	ARMReg RS = gpr.R(value);
92  
-	switch(accessSize)
  92
+	switch (accessSize)
93 93
 	{
94 94
 		case 32:
95 95
 			MOVI2R(rA, (u32)&Memory::Write_U32);
@@ -129,7 +129,7 @@ void JitArm::stX(UGeckoInstruction inst)
129 129
 	bool zeroA = true;
130 130
 	bool update = false;
131 131
 	bool fastmem = false;
132  
-	switch(inst.OPCD)
  132
+	switch (inst.OPCD)
133 133
 	{
134 134
 		case 45: // sthu
135 135
 			update = true;
@@ -314,10 +314,10 @@ void JitArm::lXX(UGeckoInstruction inst)
314 314
 	bool reverse = false;
315 315
 	bool fastmem = false;
316 316
 
317  
-	switch(inst.OPCD)
  317
+	switch (inst.OPCD)
318 318
 	{
319 319
 		case 31:
320  
-			switch(inst.SUBOP10)
  320
+			switch (inst.SUBOP10)
321 321
 			{
322 322
 				case 55: // lwzux
323 323
 					zeroA = false;
4  Source/Core/Core/PowerPC/JitArm32/JitArm_LoadStoreFloating.cpp
@@ -37,7 +37,7 @@ void JitArm::lfXX(UGeckoInstruction inst)
37 37
 	switch (inst.OPCD)
38 38
 	{
39 39
 		case 31:
40  
-			switch(inst.SUBOP10)
  40
+			switch (inst.SUBOP10)
41 41
 			{
42 42
 				case 567: // lfsux
43 43
 					single = true;
@@ -199,7 +199,7 @@ void JitArm::stfXX(UGeckoInstruction inst)
199 199
 	switch (inst.OPCD)
200 200
 	{
201 201
 		case 31:
202  
-			switch(inst.SUBOP10)
  202
+			switch (inst.SUBOP10)
203 203
 			{
204 204
 				case 663: // stfsx
205 205
 					single = true;
2  Source/Core/Core/PowerPC/JitArm32/JitArm_SystemRegisters.cpp
@@ -242,7 +242,7 @@ void JitArm::crXXX(UGeckoInstruction inst)
242 242
 		LSR(rB, rB, shiftB);
243 243
 
244 244
 	// Compute combined bit
245  
-	switch(inst.SUBOP10)
  245
+	switch (inst.SUBOP10)
246 246
 	{
247 247
 	case 33: // crnor
248 248
 		ORR(rA, rA, rB);
14  Source/Core/Core/PowerPC/JitArm32/JitFPRCache.cpp
@@ -16,14 +16,14 @@ void ArmFPRCache::Init(ARMXEmitter *emitter)
16 16
 	ARMReg *PPCRegs = GetPPCAllocationOrder(NUMPPCREG);
17 17
 	ARMReg *Regs = GetAllocationOrder(NUMARMREG);
18 18
 
19  
-	for(u8 a = 0; a < NUMPPCREG; ++a)
  19
+	for (u8 a = 0; a < NUMPPCREG; ++a)
20 20
 	{
21 21
 		ArmCRegs[a].PPCReg = 33;
22 22
 		ArmCRegs[a].Reg = PPCRegs[a];
23 23
 		ArmCRegs[a].LastLoad = 0;
24 24
 		ArmCRegs[a].PS1 = false;
25 25
 	}
26  
-	for(u8 a = 0; a < NUMARMREG; ++a)
  26
+	for (u8 a = 0; a < NUMARMREG; ++a)
27 27
 	{
28 28
 		ArmRegs[a].Reg = Regs[a];
29 29
 		ArmRegs[a].free = true;
@@ -61,8 +61,8 @@ ARMReg *ArmFPRCache::GetAllocationOrder(int &count)
61 61
 
62 62
 ARMReg ArmFPRCache::GetReg(bool AutoLock)
63 63
 {
64  
-	for(u8 a = 0; a < NUMARMREG; ++a)
65  
-		if(ArmRegs[a].free)
  64
+	for (u8 a = 0; a < NUMARMREG; ++a)
  65
+		if (ArmRegs[a].free)
66 66
 		{
67 67
 			// Alright, this one is free
68 68
 			if (AutoLock)
@@ -75,9 +75,9 @@ ARMReg ArmFPRCache::GetReg(bool AutoLock)
75 75
 }
76 76
 void ArmFPRCache::Unlock(ARMReg V0)
77 77
 {
78  
-	for(u8 RegNum = 0; RegNum < NUMARMREG; ++RegNum)
  78
+	for (u8 RegNum = 0; RegNum < NUMARMREG; ++RegNum)
79 79
 	{
80  
-		if(ArmRegs[RegNum].Reg == V0)
  80
+		if (ArmRegs[RegNum].Reg == V0)
81 81
 		{
82 82
 			_assert_msg_(_DYNA_REC, !ArmRegs[RegNum].free, "This register is already unlocked");
83 83
 			ArmRegs[RegNum].free = true;
@@ -88,7 +88,7 @@ u32 ArmFPRCache::GetLeastUsedRegister(bool increment)
88 88
 {
89 89
 	u32 HighestUsed = 0;
90 90
 	u8 lastRegIndex = 0;
91  
-	for(u8 a = 0; a < NUMPPCREG; ++a){
  91
+	for (u8 a = 0; a < NUMPPCREG; ++a){
92 92
 		if (increment)
93 93
 			++ArmCRegs[a].LastLoad;
94 94
 		if (ArmCRegs[a].LastLoad > HighestUsed)
23  Source/Core/Core/PowerPC/JitArm32/JitRegCache.cpp
@@ -16,13 +16,13 @@ void ArmRegCache::Init(ARMXEmitter *emitter)
16 16
 	ARMReg *PPCRegs = GetPPCAllocationOrder(NUMPPCREG);
17 17
 	ARMReg *Regs = GetAllocationOrder(NUMARMREG);
18 18
 
19  
-	for(u8 a = 0; a < NUMPPCREG; ++a)
  19
+	for (u8 a = 0; a < NUMPPCREG; ++a)
20 20
 	{
21 21
 		ArmCRegs[a].PPCReg = 33;
22 22
 		ArmCRegs[a].Reg = PPCRegs[a];
23 23
 		ArmCRegs[a].LastLoad = 0;
24 24
 	}
25  
-	for(u8 a = 0; a < NUMARMREG; ++a)
  25
+	for (u8 a = 0; a < NUMARMREG; ++a)
26 26
 	{
27 27
 		ArmRegs[a].Reg = Regs[a];
28 28
 		ArmRegs[a].free = true;
@@ -57,8 +57,8 @@ ARMReg *ArmRegCache::GetAllocationOrder(int &count)
57 57
 
58 58
 ARMReg ArmRegCache::GetReg(bool AutoLock)
59 59
 {
60  
-	for(u8 a = 0; a < NUMARMREG; ++a)
61  
-		if(ArmRegs[a].free)
  60
+	for (u8 a = 0; a < NUMARMREG; ++a)
  61
+		if (ArmRegs[a].free)
62 62
 		{
63 63
 			// Alright, this one is free
64 64
 			if (AutoLock)
@@ -72,23 +72,24 @@ ARMReg ArmRegCache::GetReg(bool AutoLock)
72 72
 
73 73
 void ArmRegCache::Unlock(ARMReg R0, ARMReg R1, ARMReg R2, ARMReg R3)
74 74
 {
75  
-	for(u8 RegNum = 0; RegNum < NUMARMREG; ++RegNum)
  75
+	for (u8 RegNum = 0; RegNum < NUMARMREG; ++RegNum)
76 76
 	{
77  
-		if(ArmRegs[RegNum].Reg == R0)
  77
+		if (ArmRegs[RegNum].Reg == R0)
78 78
 		{
79 79
 			_assert_msg_(_DYNA_REC, !ArmRegs[RegNum].free, "This register is already unlocked");
80 80
 			ArmRegs[RegNum].free = true;
81 81
 		}
82  
-		if( R1 != INVALID_REG && ArmRegs[RegNum].Reg == R1) ArmRegs[RegNum].free = true;
83  
-		if( R2 != INVALID_REG && ArmRegs[RegNum].Reg == R2) ArmRegs[RegNum].free = true;
84  
-		if( R3 != INVALID_REG && ArmRegs[RegNum].Reg == R3) ArmRegs[RegNum].free = true;
  82
+		if ( R1 != INVALID_REG && ArmRegs[RegNum].Reg == R1) ArmRegs[RegNum].free = true;
  83
+		if ( R2 != INVALID_REG && ArmRegs[RegNum].Reg == R2) ArmRegs[RegNum].free = true;
  84
+		if ( R3 != INVALID_REG && ArmRegs[RegNum].Reg == R3) ArmRegs[RegNum].free = true;
85 85
 	}
86 86
 }
87 87
 u32 ArmRegCache::GetLeastUsedRegister(bool increment)
88 88
 {
89 89
 	u32 HighestUsed = 0;
90 90
 	u8 lastRegIndex = 0;
91  
-	for(u8 a = 0; a < NUMPPCREG; ++a){
  91
+	for (u8 a = 0; a < NUMPPCREG; ++a)
  92
+	{
92 93
 		if (increment)
93 94
 			++ArmCRegs[a].LastLoad;
94 95
 		if (ArmCRegs[a].LastLoad > HighestUsed)
@@ -118,7 +119,7 @@ ARMReg ArmRegCache::R(u32 preg)
118 119
 	u32 lastRegIndex = GetLeastUsedRegister(true);
119 120
 
120 121
 	// Check if already Loaded
121  
-	if(regs[preg].GetType() == REG_REG)
  122
+	if (regs[preg].GetType() == REG_REG)
122 123
 	{
123 124
 		u8 a = regs[preg].GetRegIndex();
124 125
 		ArmCRegs[a].LastLoad = 0;
2  Source/Core/Core/PowerPC/JitArmIL/IR_Arm.cpp
@@ -165,7 +165,7 @@ static void regWriteExit(RegInfo& RI, InstLoc dest) {
165 165
 }
166 166
 static void regStoreInstToPPCState(RegInfo& RI, unsigned width, InstLoc I, s32 offset) {
167 167
 	void (JitArmIL::*op)(ARMReg, ARMReg, Operand2, bool);
168  
-	switch(width)
  168
+	switch (width)
169 169
 	{
170 170
 		case 32:
171 171
 			op = &JitArmIL::STR;
14  Source/Core/Core/PowerPC/JitArmIL/JitIL.cpp
@@ -81,7 +81,7 @@ void JitArmIL::DoDownCount()
81 81
 	ARMReg rB = R12;
82 82
 	MOVI2R(rA, (u32)&CoreTiming::downcount);
83 83
 	LDR(rB, rA);
84  
-	if(js.downcountAmount < 255) // We can enlarge this if we used rotations
  84
+	if (js.downcountAmount < 255) // We can enlarge this if we used rotations
85 85
 	{
86 86
 		SUBS(rB, rB, js.downcountAmount);
87 87
 		STR(rB, rA);
@@ -155,19 +155,19 @@ void JitArmIL::PrintDebug(UGeckoInstruction inst, u32 level)
155 155
 		printf("\tOuts\n");
156 156
 		if (Info->flags & FL_OUT_A)
157 157
 			printf("\t-OUT_A: %x\n", inst.RA);
158  
-		if(Info->flags & FL_OUT_D)
  158
+		if (Info->flags & FL_OUT_D)
159 159
 			printf("\t-OUT_D: %x\n", inst.RD);
160 160
 		printf("\tIns\n");
161 161
 		// A, AO, B, C, S
162  
-		if(Info->flags & FL_IN_A)
  162
+		if (Info->flags & FL_IN_A)
163 163
 			printf("\t-IN_A: %x\n", inst.RA);
164  
-		if(Info->flags & FL_IN_A0)
  164
+		if (Info->flags & FL_IN_A0)
165 165
 			printf("\t-IN_A0: %x\n", inst.RA);
166  
-		if(Info->flags & FL_IN_B)
  166
+		if (Info->flags & FL_IN_B)
167 167
 			printf("\t-IN_B: %x\n", inst.RB);
168  
-		if(Info->flags & FL_IN_C)
  168
+		if (Info->flags & FL_IN_C)
169 169
 			printf("\t-IN_C: %x\n", inst.RC);
170  
-		if(Info->flags & FL_IN_S)
  170
+		if (Info->flags & FL_IN_S)
171 171
 			printf("\t-IN_S: %x\n", inst.RS);
172 172
 	}
173 173
 }
2  Source/Core/Core/PowerPC/JitArmIL/JitIL_Branch.cpp
@@ -116,7 +116,7 @@ void JitArmIL::bcx(UGeckoInstruction inst)
116 116
 	IREmitter::InstLoc Test = TestBranch(ibuild, inst);
117 117
 
118 118
 	u32 destination;
119  
-	if(inst.AA)
  119
+	if (inst.AA)
120 120
 		destination = SignExt16(inst.BD << 2);
121 121
 	else
122 122
 		destination = js.compilerPC + SignExt16(inst.BD << 2);
2  Source/Core/Core/PowerPC/JitILCommon/JitILBase_Branch.cpp
@@ -108,7 +108,7 @@ void JitILBase::bcx(UGeckoInstruction inst)
108 108
 	IREmitter::InstLoc Test = TestBranch(ibuild, inst);
109 109
 
110 110
 	u32 destination;
111  
-	if(inst.AA)
  111
+	if (inst.AA)
112 112
 		destination = SignExt16(inst.BD << 2);
113 113
 	else
114 114
 		destination = js.compilerPC + SignExt16(inst.BD << 2);
2  Source/Core/Core/PowerPC/JitILCommon/JitILBase_LoadStore.cpp
@@ -139,7 +139,7 @@ void JitILBase::dcbz(UGeckoInstruction inst)
139 139
 
140 140
 	// TODO!
141 141
 #if 0
142  
-	if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
  142
+	if (Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
143 143
 		{Default(inst); return;} // turn off from debugger
144 144
 	INSTRUCTION_START;
145 145
 		MOV(32, R(EAX), gpr.R(inst.RB));
4  Source/Core/Core/PowerPC/JitInterface.cpp
@@ -46,7 +46,7 @@
46 46
 		bMMU = SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU;
47 47
 
48 48
 		CPUCoreBase *ptr = nullptr;
49  
-		switch(core)
  49
+		switch (core)
50 50
 		{
51 51
 			#if _M_X86
52 52
 			case 1:
@@ -85,7 +85,7 @@
85 85
 	}
86 86
 	void InitTables(int core)
87 87
 	{
88  
-		switch(core)
  88
+		switch (core)
89 89
 		{
90 90
 			#if _M_X86
91 91
 			case 1:
2  Source/Core/Core/PowerPC/PPCSymbolDB.cpp
@@ -273,7 +273,7 @@ bool PPCSymbolDB::SaveMap(const char *filename, bool WithCodes) const
273 273
 	const int wxYES_NO = 0x00000002 | 0x00000008;
274 274
 	if (functions.size() == 0)
275 275
 	{
276  
-		if(!AskYesNo(StringFromFormat(
  276
+		if (!AskYesNo(StringFromFormat(
277 277
 			"No symbol names are generated. Do you want to replace '%s' with a blank file?",
278 278
 			mapFile.c_str()).c_str(), "Confirm", wxYES_NO)) return false;
279 279
 	}
4  Source/Core/Core/PowerPC/PPCTables.cpp
@@ -31,7 +31,7 @@ GekkoOPInfo *GetOpInfo(UGeckoInstruction _inst)
31 31
 	if ((info->type & 0xFFFFFF) == OPTYPE_SUBTABLE)
32 32
 	{
33 33
 		int table = info->type>>24;
34  
-		switch(table)
  34
+		switch (table)
35 35
 		{
36 36
 		case 4:  return m_infoTable4[_inst.SUBOP10];
37 37
 		case 19: return m_infoTable19[_inst.SUBOP10];
@@ -60,7 +60,7 @@ GekkoOPInfo *GetOpInfo(UGeckoInstruction _inst)
60 60
 	if ((info->type & 0xFFFFFF) == OPTYPE_SUBTABLE)
61 61
 	{
62 62
 		int table = info->type>>24;
63  
-		switch(table)
  63
+		switch (table)
64 64
 		{
65 65
 		case 4:  return Interpreter::m_opTable4[_inst.SUBOP10];
66 66
 		case 19: return Interpreter::m_opTable19[_inst.SUBOP10];
6  Source/Core/DiscIO/BannerLoaderWii.cpp
@@ -45,21 +45,21 @@
45 45
 		// Creating title folder
46 46
 		sprintf(titleFolder, "%stitle/%08x/%08x/data/",
47 47
 			File::GetUserPath(D_WIIUSER_IDX).c_str(), (u32)(TitleID>>32), (u32)TitleID);
48  
-		if(!File::Exists(titleFolder))
  48
+		if (!File::Exists(titleFolder))
49 49
 			File::CreateFullPath(titleFolder);
50 50
 
51 51
 		// Extracting banner.bin from opening.bnr
52 52
 		sprintf(bnrFilename, "%stitle/%08x/%08x/data/opening.bnr",
53 53
 			File::GetUserPath(D_WIIUSER_IDX).c_str(), (u32)(TitleID>>32), (u32)TitleID);
54 54
 
55  
-		if(!_rFileSystem.ExportFile("opening.bnr", bnrFilename)) {
  55
+		if (!_rFileSystem.ExportFile("opening.bnr", bnrFilename)) {
56 56
 			m_IsValid = false;
57 57
 			return;
58 58
 		}
59 59
 
60 60
 		CARCFile bnrArc (bnrFilename, 0x600);
61 61
 
62  
-		if(!bnrArc.ExportFile("meta/banner.bin", Filename)) {
  62
+		if (!bnrArc.ExportFile("meta/banner.bin", Filename)) {
63 63
 			m_IsValid = false;
64 64
 			return;
65 65
 		}
2  Source/Core/DiscIO/DriveBlob.cpp
@@ -124,7 +124,7 @@ bool DriveReader::ReadMultipleAlignedBlocks(u64 block_num, u64 num_blocks, u8 *o
124 124
 	}
125 125
 #else
126 126
 	fseeko(file_.GetHandle(), m_blocksize*block_num, SEEK_SET);
127  
-	if(fread(out_ptr, 1, m_blocksize * num_blocks, file_.GetHandle()) != m_blocksize * num_blocks)
  127
+	if (fread(out_ptr, 1, m_blocksize * num_blocks, file_.GetHandle()) != m_blocksize * num_blocks)
128 128
 		return false;
129 129
 #endif
130 130
 	return true;
4  Source/Core/DiscIO/NANDContentLoader.cpp
@@ -336,7 +336,7 @@ void CNANDContentLoader::GetKeyFromTicket(u8* pTicket, u8* pTicketKey)
336 336
 {
337 337
 	CNANDContentMap::iterator lb = m_Map.lower_bound(_rName);
338 338
 
339  
-	if(lb == m_Map.end() || (m_Map.key_comp()(_rName, lb->first)))
  339
+	if (lb == m_Map.end() || (m_Map.key_comp()(_rName, lb->first)))
340 340
 	{
341 341
 		m_Map.insert(lb, CNANDContentMap::value_type(_rName, new CNANDContentLoader(_rName)));
342 342
 	}
@@ -367,7 +367,7 @@ bool CNANDContentManager::RemoveTitle(u64 _titleID)
367 367
 void CNANDContentLoader::RemoveTitle() const
368 368
 {
369 369
 	INFO_LOG(DISCIO, "RemoveTitle %08x/%08x", (u32)(m_TitleID >> 32), (u32)m_TitleID);
370  
-	if(IsValid())
  370
+	if (IsValid())
371 371
 	{
372 372
 		// remove tmd?
373 373
 		for (u32 i = 0; i < m_numEntries; i++)
2  Source/Core/DiscIO/VolumeCommon.cpp
@@ -81,7 +81,7 @@
81 81
 
82 82
 u8 GetSysMenuRegion(u16 _TitleVersion)
83 83
 {
84  
-	switch(_TitleVersion)
  84
+	switch (_TitleVersion)
85 85
 	{
86 86
 	case 128: case 192: case 224: case 256:
87 87
 	case 288: case 352: case 384: case 416:
58  Source/Core/DiscIO/VolumeDirectory.cpp
@@ -42,7 +42,7 @@
42 42
 	SetUniqueID("AGBJ01");
43 43
 	SetName("Default name");
44 44
 
45  
-	if(_bIsWii)
  45
+	if (_bIsWii)
46 46
 	{
47 47
 		SetDiskTypeWii();
48 48
 	}
@@ -92,60 +92,60 @@ bool CVolumeDirectory::RAWRead( u64 _Offset, u64 _Length, u8* _pBuffer ) const
92 92
 bool CVolumeDirectory::Read(u64 _Offset, u64 _Length, u8* _pBuffer) const
93 93
 {
94 94
 	// header
95  
-	if(_Offset < DISKHEADERINFO_ADDRESS)
  95
+	if (_Offset < DISKHEADERINFO_ADDRESS)
96 96
 	{
97 97
 		WriteToBuffer(DISKHEADER_ADDRESS, DISKHEADERINFO_ADDRESS, m_diskHeader, _Offset, _Length, _pBuffer);
98 98
 	}
99 99
 	// header info
100  
-	if(_Offset >= DISKHEADERINFO_ADDRESS && _Offset < APPLOADER_ADDRESS)
  100
+	if (_Offset >= DISKHEADERINFO_ADDRESS && _Offset < APPLOADER_ADDRESS)
101 101
 	{
102 102
 		WriteToBuffer(DISKHEADERINFO_ADDRESS, sizeof(m_diskHeaderInfo), (u8*)m_diskHeaderInfo, _Offset, _Length, _pBuffer);
103 103
 	}
104 104
 	// apploader
105  
-	if(_Offset >= APPLOADER_ADDRESS && _Offset < APPLOADER_ADDRESS + m_apploaderSize)
  105
+	if (_Offset >= APPLOADER_ADDRESS && _Offset < APPLOADER_ADDRESS + m_apploaderSize)
106 106
 	{
107 107
 		WriteToBuffer(APPLOADER_ADDRESS, m_apploaderSize, m_apploader, _Offset, _Length, _pBuffer);
108 108
 	}
109 109
 	// dol
110  
-	if(_Offset >= DOL_ADDRESS && _Offset < DOL_ADDRESS + m_DOLSize)
  110
+	if (_Offset >= DOL_ADDRESS && _Offset < DOL_ADDRESS + m_DOLSize)
111 111
 	{
112 112
 		WriteToBuffer(DOL_ADDRESS, m_DOLSize, m_DOL, _Offset, _Length, _pBuffer);
113 113
 	}
114 114
 	// fst
115  
-	if(_Offset >= FST_ADDRESS && _Offset < m_dataStartAddress)
  115
+	if (_Offset >= FST_ADDRESS && _Offset < m_dataStartAddress)
116 116
 	{
117 117
 		WriteToBuffer(FST_ADDRESS, m_fstSize, m_FSTData, _Offset, _Length, _pBuffer);
118 118
 	}
119 119
 
120  
-	if(m_virtualDisk.empty())
  120
+	if (m_virtualDisk.empty())
121 121
 		return true;
122 122
 
123 123
 	// Determine which file the offset refers to
124 124
 	std::map<u64, std::string>::const_iterator fileIter = m_virtualDisk.lower_bound(_Offset);
125  
-	if(fileIter->first > _Offset && fileIter != m_virtualDisk.begin())
  125
+	if (fileIter->first > _Offset && fileIter != m_virtualDisk.begin())
126 126
 		--fileIter;
127 127
 
128 128
 	// zero fill to start of file data
129 129
 	PadToAddress(fileIter->first, _Offset, _Length, _pBuffer);
130 130
 
131  
-	while(fileIter != m_virtualDisk.end() && _Length > 0)
  131
+	while (fileIter != m_virtualDisk.end() && _Length > 0)
132 132
 	{
133 133
 		_dbg_assert_(DVDINTERFACE, fileIter->first <= _Offset);
134 134
 		u64 fileOffset = _Offset - fileIter->first;
135 135
 
136 136
 		PlainFileReader* reader = PlainFileReader::Create(fileIter->second.c_str());
137  
-		if(reader == nullptr)
  137
+		if (reader == nullptr)
138 138
 			return false;
139 139
 
140 140
 		u64 fileSize = reader->GetDataSize();
141 141
 
142  
-		if(fileOffset < fileSize)
  142
+		if (fileOffset < fileSize)
143 143
 		{
144 144
 			u64 fileBytes = fileSize - fileOffset;
145  
-			if(_Length < fileBytes)
  145
+			if (_Length < fileBytes)
146 146
 				fileBytes = _Length;
147 147
 
148  
-			if(!reader->Read(fileOffset, fileBytes, _pBuffer))
  148
+			if (!reader->Read(fileOffset, fileBytes, _pBuffer))
149 149
 				return false;
150 150
 
151 151
 			_Length -= fileBytes;
@@ -155,7 +155,7 @@ bool CVolumeDirectory::Read(u64 _Offset, u64 _Length, u8* _pBuffer) const
155 155
 
156 156
 		++fileIter;
157 157
 
158  
-		if(fileIter != m_virtualDisk.end())
  158
+		if (fileIter != m_virtualDisk.end())
159 159
 		{
160 160
 			_dbg_assert_(DVDINTERFACE, fileIter->first >= _Offset);
161 161
 			PadToAddress(fileIter->first, _Offset, _Length, _pBuffer);
@@ -184,7 +184,7 @@ void CVolumeDirectory::SetUniqueID(std::string _ID)
184 184
 	_dbg_assert_(DVDINTERFACE, m_diskHeader);
185 185
 
186 186
 	u32 length = (u32)_ID.length();
187  
-	if(length > 6)
  187
+	if (length > 6)
188 188
 		length = 6;
189 189
 
190 190
 	memcpy(m_diskHeader, _ID.c_str(), length);
@@ -215,8 +215,8 @@ void CVolumeDirectory::SetName(std::string _Name)
215 215
 	_dbg_assert_(DVDINTERFACE, m_diskHeader);
216 216
 
217 217
 	u32 length = (u32)_Name.length();
218  
-	if(length > MAX_NAME_LENGTH)
219  
-		length = MAX_NAME_LENGTH;
  218
+	if (length > MAX_NAME_LENGTH)
  219
+	    length = MAX_NAME_LENGTH;
220 220
 
221 221
 	memcpy(m_diskHeader + 0x20, _Name.c_str(), length);
222 222
 	m_diskHeader[length + 0x20] = 0;
@@ -248,13 +248,13 @@ u64 CVolumeDirectory::GetRawSize() const
248 248
 
249 249
 	size_t lastSep = directoryName.find_last_of(DIR_SEP_CHR);
250 250
 
251  
-	if(lastSep != directoryName.size() - 1)
  251
+	if (lastSep != directoryName.size() - 1)
252 252
 	{
253 253
 		// TODO: This assumes that file names will always have a dot in them
254 254
 		//       and directory names never will; both assumptions are often
255 255
 		//       right but in general wrong.
256 256
 		size_t extensionStart = directoryName.find_last_of('.');
257  
-		if(extensionStart != std::string::npos && extensionStart > lastSep)
  257
+		if (extensionStart != std::string::npos && extensionStart > lastSep)
258 258
 		{
259 259
 			directoryName.resize(lastSep);
260 260
 		}
@@ -345,7 +345,7 @@ void CVolumeDirectory::SetDOL(const std::string& _rDOL)
345 345
 
346 346
 void CVolumeDirectory::BuildFST()
347 347
 {
348  
-	if(m_FSTData)
  348
+	if (m_FSTData)
349 349
 	{
350 350
 		delete m_FSTData;
351 351
 	}
@@ -374,7 +374,7 @@ void CVolumeDirectory::BuildFST()
374 374
 	// write root entry
375 375
 	WriteEntryData(fstOffset, DIRECTORY_ENTRY, 0, 0, totalEntries);
376 376
 
377  
-	for(auto& entry : rootEntry.children)
  377
+	for (auto& entry : rootEntry.children)
378 378
 	{
379 379
 		WriteEntry(entry, fstOffset, nameOffset, curDataAddress, rootOffset);
380 380
 	}
@@ -392,17 +392,17 @@ void CVolumeDirectory::BuildFST()
392 392
 void CVolumeDirectory::WriteToBuffer(u64 _SrcStartAddress, u64 _SrcLength, u8* _Src,
393 393
 									 u64& _Address, u64& _Length, u8*& _pBuffer) const
394 394
 {
395  
-	if(_Length == 0)
  395
+	if (_Length == 0)
396 396
 		return;
397 397
 
398 398
 	_dbg_assert_(DVDINTERFACE, _Address >= _SrcStartAddress);
399 399
 
400 400
 	u64 srcOffset = _Address - _SrcStartAddress;
401 401
 
402  
-	if(srcOffset < _SrcLength)
  402
+	if (srcOffset < _SrcLength)
403 403
 	{
404 404
 		u64 srcBytes = _SrcLength - srcOffset;
405  
-		if(_Length < srcBytes)
  405
+		if (_Length < srcBytes)
406 406
 			srcBytes = _Length;
407 407
 
408 408
 		memcpy(_pBuffer, _Src + srcOffset, (size_t)srcBytes);
@@ -415,14 +415,14 @@ void CVolumeDirectory::WriteToBuffer(u64 _SrcStartAddress, u64 _SrcLength, u8* _
415 415
 
416 416
 void CVolumeDirectory::PadToAddress(u64 _StartAddress, u64& _Address, u64& _Length, u8*& _pBuffer) const
417 417
 {
418  
-	if(_StartAddress <= _Address)
  418
+	if (_StartAddress <= _Address)
419 419
 		return;
420 420
 
421 421
 	u64 padBytes = _StartAddress - _Address;
422  
-	if(padBytes > _Length)
  422
+	if (padBytes > _Length)
423 423
 		padBytes = _Length;
424 424
 
425  
-	if(_Length > 0)
  425
+	if (_Length > 0)
426 426
 	{
427 427
 		memset(_pBuffer, 0, (size_t)padBytes);
428 428
 		_Length -= padBytes;
@@ -463,14 +463,14 @@ void CVolumeDirectory::WriteEntryName(u32& nameOffset, const std::string& name)
463 463
 
464 464
 void CVolumeDirectory::WriteEntry(const File::FSTEntry& entry, u32& fstOffset, u32& nameOffset, u64& dataOffset, u32 parentEntryNum)
465 465
 {
466  
-	if(entry.isDirectory)
  466
+	if (entry.isDirectory)
467 467
 	{
468 468
 		u32 myOffset = fstOffset;
469 469
 		u32 myEntryNum = myOffset / ENTRY_SIZE;
470 470
 		WriteEntryData(fstOffset, DIRECTORY_ENTRY, nameOffset, parentEntryNum, (u32)(myEntryNum + entry.size + 1));
471 471
 		WriteEntryName(nameOffset, entry.virtualName);
472 472
 
473  
-		for(const auto& child : entry.children)
  473
+		for (const auto& child : entry.children)
474 474
 		{
475 475
 			WriteEntry(child, fstOffset, nameOffset, dataOffset, myEntryNum);
476 476
 		}
4  Source/Core/DiscIO/VolumeWad.cpp
@@ -66,7 +66,7 @@ bool CVolumeWAD::Read(u64 _Offset, u64 _Length, u8* _pBuffer) const
66 66
 	u32 Offset = ALIGN_40(hdr_size) + ALIGN_40(cert_size);
67 67
 
68 68
 	char GameCode[8];
69  
-	if(!Read(Offset + 0x01E0, 4, (u8*)GameCode))
  69
+	if (!Read(Offset + 0x01E0, 4, (u8*)GameCode))
70 70
 		return "0";
71 71
 
72 72
 	GameCode[4] = temp.at(0);
@@ -94,7 +94,7 @@ bool CVolumeWAD::GetTitleID(u8* _pBuffer) const
94 94
 {
95 95
 	u32 Offset = ALIGN_40(hdr_size) + ALIGN_40(cert_size);
96 96
 
97  
-	if(!Read(Offset + 0x01DC, 8, _pBuffer))
  97
+	if (!Read(Offset + 0x01DC, 8, _pBuffer))
98 98
 		return false;
99 99
 
100 100
 	return true;
28  Source/Core/DiscIO/WbfsBlob.cpp
@@ -26,7 +26,7 @@ static inline u64 align(u64 value, u64 bounds)
26 26
 WbfsFileReader::WbfsFileReader(const char* filename)
27 27
 	: m_total_files(0), m_size(0), m_wlba_table(nullptr), m_good(true)
28 28
 {
29  
-	if(!filename || (strlen(filename) < 4) || !OpenFiles(filename) || !ReadHeader())
  29
+	if (!filename || (strlen(filename) < 4) || !OpenFiles(filename) || !ReadHeader())
30 30
 	{
31 31
 		m_good = false;
32 32
 		return;
@@ -40,7 +40,7 @@ static inline u64 align(u64 value, u64 bounds)
40 40
 
41 41
 WbfsFileReader::~WbfsFileReader()
42 42
 {
43  
-	for(u32 i = 0; i != m_files.size(); ++ i)
  43
+	for (u32 i = 0; i != m_files.size(); ++ i)
44 44
 	{
45 45
 		delete m_files[i];
46 46
 	}
@@ -52,18 +52,18 @@ bool WbfsFileReader::OpenFiles(const char* filename)
52 52
 {
53 53
 	m_total_files = 0;
54 54
 
55  
-	while(true)
  55
+	while (true)
56 56
 	{
57 57
 		file_entry* new_entry = new file_entry;
58 58
 
59 59
 		// Replace last character with index (e.g. wbfs = wbf1)
60 60
 		std::string path = filename;
61  
-		if(0 != m_total_files)
  61
+		if (0 != m_total_files)
62 62
 		{
63 63
 			path[path.length() - 1] = '0' + m_total_files;
64 64
 		}
65 65
 
66  
-		if(!new_entry->file.Open(path, "rb"))
  66
+		if (!new_entry->file.Open(path, "rb"))
67 67
 		{
68 68
 			delete new_entry;
69 69
 			return 0 != m_total_files;
@@ -89,7 +89,7 @@ bool WbfsFileReader::ReadHeader()
89 89
 	m_files[0]->file.ReadBytes(&hd_sector_shift, 1);
90 90
 	hd_sector_size = 1ull << hd_sector_shift;
91 91
 
92  
-	if(m_size != hd_sector_count * hd_sector_size)
  92
+	if (m_size != hd_sector_count * hd_sector_size)
93 93
 	{
94 94
 		//printf("File size doesn't match expected size\n");
95 95
 		return false;
@@ -100,7 +100,7 @@ bool WbfsFileReader::ReadHeader()
100 100
 	wbfs_sector_size = 1ull << wbfs_sector_shift;
101 101
 	wbfs_sector_count = m_size / wbfs_sector_size;
102 102
 
103  
-	if(wbfs_sector_size < wii_sector_size)
  103
+	if (wbfs_sector_size < wii_sector_size)
104 104
 	{
105 105
 		//Setting this too low would case a very large memory allocation
106 106
 		return false;
@@ -113,7 +113,7 @@ bool WbfsFileReader::ReadHeader()
113 113
 	m_files[0]->file.Seek(2, SEEK_CUR);
114 114
 	m_files[0]->file.ReadBytes(disc_table, 500);
115 115
 
116  
-	if(0 == disc_table[0])
  116
+	if (0 == disc_table[0])
117 117
 	{
118 118
 		//printf("Game must be in 'slot 0'\n");
119 119
 		return false;
@@ -124,7 +124,7 @@ bool WbfsFileReader::ReadHeader()
124 124
 
125 125
 bool WbfsFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
126 126
 {
127  
-	while(nbytes)
  127
+	while (nbytes)
128 128
 	{
129 129
 		u64 read_size = 0;
130 130
 		File::IOFile& data_file = SeekToCluster(offset, &read_size);
@@ -143,18 +143,18 @@ bool WbfsFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
143 143
 File::IOFile& WbfsFileReader::SeekToCluster(u64 offset, u64* available)
144 144
 {
145 145
 	u64 base_cluster = offset >> wbfs_sector_shift;
146  
-	if(base_cluster < m_blocks_per_disc)
  146
+	if (base_cluster < m_blocks_per_disc)
147 147
 	{
148 148
 		u64 cluster_address = wbfs_sector_size * Common::swap16(m_wlba_table[base_cluster]);
149 149
 		u64 cluster_offset = offset & (wbfs_sector_size - 1);
150 150
 		u64 final_address = cluster_address + cluster_offset;
151 151
 
152  
-		for(u32 i = 0; i != m_total_files; i ++)
  152
+		for (u32 i = 0; i != m_total_files; i ++)
153 153
 		{
154  
-			if(final_address < (m_files[i]->base_address + m_files[i]->size))
  154
+			if (final_address < (m_files[i]->base_address + m_files[i]->size))
155 155
 			{
156 156
 				m_files[i]->file.Seek(final_address - m_files[i]->base_address, SEEK_SET);
157  
-				if(available)
  157
+				if (available)
158 158
 				{
159 159
 					u64 till_end_of_file = m_files[i]->size - (final_address - m_files[i]->base_address);
160 160
 					u64 till_end_of_sector = wbfs_sector_size - cluster_offset;
@@ -175,7 +175,7 @@ WbfsFileReader* WbfsFileReader::Create(const char* filename)
175 175
 {
176 176
 	WbfsFileReader* reader = new WbfsFileReader(filename);
177 177
 
178  
-	if(reader->IsGood())
  178
+	if (reader->IsGood())
179 179
 	{
180 180
 		return reader;
181 181
 	}
4  Source/Core/DiscIO/WiiWad.cpp
@@ -38,7 +38,7 @@ class CBlobBigEndianReader
38 38
 	if (pReader == nullptr || File::IsDirectory(_rName))
39 39
 	{
40 40
 		m_Valid = false;
41  
-		if(pReader) delete pReader;
  41
+		if (pReader) delete pReader;
42 42
 		return;
43 43
 	}
44 44
 
@@ -131,7 +131,7 @@ bool WiiWAD::IsWiiWAD(const std::string& _rName)
131 131
 	if (Reader.Read32(0x00) == 0x20)
132 132
 	{
133 133
 		u32 WADTYpe = Reader.Read32(0x04);
134  
-		switch(WADTYpe)
  134
+		switch (WADTYpe)
135 135
 		{
136 136
 		case 0x49730000:
137 137
 		case 0x69620000:
6  Source/Core/DolphinWX/ConfigMain.cpp
@@ -203,7 +203,7 @@ struct CPUCore
203 203
 	CreateGUIControls();
204 204
 
205 205
 	// Update selected ISO paths
206  
-	for(const std::string& folder : SConfig::GetInstance().m_ISOFolder)
  206
+	for (const std::string& folder : SConfig::GetInstance().m_ISOFolder)
207 207
 	{
208 208
 		ISOPaths->Append(StrToWxStr(folder));
209 209
 	}
@@ -228,7 +228,7 @@ void CConfigMain::SetSelectedTab(int tab)
228 228
 // Used to restrict changing of some options while emulator is running
229 229
 void CConfigMain::UpdateGUI()
230 230
 {
231  
-	if(Core::GetState() != Core::CORE_UNINITIALIZED)
  231
+	if (Core::GetState() != Core::CORE_UNINITIALIZED)
232 232
 	{
233 233
 		// Disable the Core stuff on GeneralPage
234 234
 		CPUThread->Disable();
@@ -1195,7 +1195,7 @@ void CConfigMain::WiiSettingsChanged(wxCommandEvent& event)
1195 1195
 		int wii_system_lang = WiiSystemLang->GetSelection();
1196 1196
 		SConfig::GetInstance().m_SYSCONF->SetData("IPL.LNG", wii_system_lang);
1197 1197
 		u8 country_code = GetSADRCountryCode(wii_system_lang);
1198  
-		if(!SConfig::GetInstance().m_SYSCONF->SetArrayData("IPL.SADR", &country_code, 1))
  1198
+		if (!SConfig::GetInstance().m_SYSCONF->SetArrayData("IPL.SADR", &country_code, 1))
1199 1199
 		{
1200 1200
 			PanicAlert("Failed to update country code in SYSCONF");
1201 1201
 		}
4  Source/Core/DolphinWX/Debugger/CodeView.cpp
@@ -184,9 +184,9 @@ void CCodeView::InsertBlrNop(int Blr)
184 184
 {
185 185
 	// Check if this address has been modified
186 186
 	int find = -1;
187  
-	for(u32 i = 0; i < BlrList.size(); i++)
  187
+	for (u32 i = 0; i < BlrList.size(); i++)
188 188
 	{
189  
-		if(BlrList.at(i).Address == selection)
  189
+		if (BlrList.at(i).Address == selection)
190 190
 		{
191 191
 			find = i;
192 192
 			break;
8  Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp
@@ -207,7 +207,7 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event)
207 207
 				}
208 208
 				wxString OpenCommand;
209 209
 				OpenCommand = filetype->GetOpenCommand(StrToWxStr(filename));
210  
-				if(!OpenCommand.IsEmpty())
  210
+				if (!OpenCommand.IsEmpty())
211 211
 					wxExecute(OpenCommand, wxEXEC_SYNC);
212 212
 			}
213 213
 		}
@@ -227,7 +227,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
227 227
 	switch (event.GetId())
228 228
 	{
229 229
 	case IDM_CLEARSYMBOLS:
230  
-		if(!AskYesNo("Do you want to clear the list of symbol names?")) return;
  230
+		if (!AskYesNo("Do you want to clear the list of symbol names?")) return;
231 231
 		g_symbolDB.Clear();
232 232
 		Host_NotifyMapLoaded();
233 233
 		break;
@@ -381,9 +381,9 @@ void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
381 381
 		Symbol* pSymbol = static_cast<Symbol *>(symbols->GetClientData(index));
382 382
 		if (pSymbol != nullptr)
383 383
 		{
384  
-			if(pSymbol->type == Symbol::SYMBOL_DATA)
  384
+			if (pSymbol->type == Symbol::SYMBOL_DATA)
385 385
 			{
386  
-				if(m_MemoryWindow)// && m_MemoryWindow->IsVisible())
  386
+				if (m_MemoryWindow)// && m_MemoryWindow->IsVisible())
387 387
 					m_MemoryWindow->JumpToAddress(pSymbol->address);
388 388
 			}
389 389
 			else
7  Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp
@@ -83,9 +83,10 @@ void GFXDebuggerPanel::SaveSettings() const
83 83
 	// weird values, perhaps because of some conflict with the rendering window
84 84
 
85 85
 	// TODO: get the screen resolution and make limits from that
86  
-	if (GetPosition().x < 1000 && GetPosition().y < 1000
87  
-							   && GetSize().GetWidth() < 1000
88  
-							   && GetSize().GetHeight() < 1000)
  86
+	if (GetPosition().x < 1000 &&
  87
+	    GetPosition().y < 1000 &&
  88
+	    GetSize().GetWidth() < 1000 &&
  89
+	    GetSize().GetHeight() < 1000)
89 90
 	{
90 91
 		file.Set("VideoWindow", "x", GetPosition().x);
91 92
 		file.Set("VideoWindow", "y", GetPosition().y);
20  Source/Core/DolphinWX/Debugger/MemoryWindow.cpp
@@ -130,7 +130,7 @@ enum
130 130
 void CMemoryWindow::Save(IniFile& _IniFile) const
131 131
 {
132 132
 	// Prevent these bad values that can happen after a crash or hanging
133  
-	if(GetPosition().x != -32000 && GetPosition().y != -32000)
  133
+	if (GetPosition().x != -32000 && GetPosition().y != -32000)
134 134
 	{
135 135
 		_IniFile.Set("MemoryWindow", "x", GetPosition().x);
136 136
 		_IniFile.Set("MemoryWindow", "y", GetPosition().y);
@@ -356,7 +356,7 @@ void CMemoryWindow::onSearch(wxCommandEvent& event)
356 356
 		strcat(tmpstr, WxStrToStr(rawData).c_str());
357 357
 		tmp2 = &Dest.front();
358 358
 		count = 0;
359  
-		for(i = 0; i < strlen(tmpstr); i++)
  359
+		for (i = 0; i < strlen(tmpstr); i++)
360 360
 		{
361 361
 			copy[0] = tmpstr[i];
362 362
 			copy[1] = tmpstr[i+1];
@@ -381,13 +381,13 @@ void CMemoryWindow::onSearch(wxCommandEvent& event)
381 381
 		tmp2 = &Dest.front();
382 382
 		sprintf(tmpstr, "%s", WxStrToStr(rawData).c_str());
383 383
 
384  
-		for(i = 0; i < size; i++)
  384
+		for (i = 0; i < size; i++)
385 385
 			tmp2[i] = tmpstr[i];
386 386
 
387 387
 		delete[] tmpstr;
388 388
 	}
389 389
 
390  
-	if(size)
  390
+	if (size)
391 391
 	{
392 392
 		unsigned char* pnt = &Dest.front();
393 393
 		unsigned int k = 0;
@@ -399,19 +399,19 @@ void CMemoryWindow::onSearch(wxCommandEvent& event)
399 399
 			sscanf(WxStrToStr(txt).c_str(), "%08x", &addr);
400 400
 		}
401 401
 		i = addr+4;
402  
-		for( ; i < szRAM; i++)
  402
+		for ( ; i < szRAM; ++i)
403 403
 		{
404  
-			for(k = 0; k < size; k++)
  404
+			for (k = 0; k < size; ++k)
405 405
 			{
406  
-				if(i + k > szRAM) break;
407  
-				if(k > size) break;
408  
-				if(pnt[k] != TheRAM[i+k])
  406
+				if (i + k > szRAM) break;
  407
+				if (k > size) break;
  408
+				if (pnt[k] != TheRAM[i+k])
409 409
 				{
410 410
 					k = 0;
411 411
 					break;
412 412
 				}
413 413
 			}
414  
-			if(k == size)
  414
+			if (k == size)
415 415
 			{
416 416
 				//Match was found
417 417
 				wxMessageBox(_("A match was found. Placing viewer at the offset."));
22  Source/Core/DolphinWX/Frame.cpp
@@ -105,7 +105,7 @@ HWND MSWGetParent_(HWND Parent)
105 105
 		switch (nMsg)
106 106
 		{
107 107
 		case WM_USER:
108  
-			switch(wParam)
  108
+			switch (wParam)
109 109
 			{
110 110
 			case WM_USER_STOP:
111 111
 				main_frame->DoStop();
@@ -497,7 +497,7 @@ void CFrame::OnClose(wxCloseEvent& event)
497 497
 	}
498 498
 
499 499
 	//Stop Dolphin from saving the minimized Xpos and Ypos
500  
-	if(main_frame->IsIconized())
  500
+	if (main_frame->IsIconized())
501 501
 		main_frame->Iconize(false);
502 502
 
503 503
 	// Don't forget the skip or the window won't be destroyed
@@ -873,8 +873,8 @@ bool TASInputHasFocus()
873 873
 
874 874
 void CFrame::OnKeyDown(wxKeyEvent& event)
875 875
 {
876  
-	if(Core::GetState() != Core::CORE_UNINITIALIZED &&
877  
-			(RendererHasFocus() || TASInputHasFocus()))
  876
+	if (Core::GetState() != Core::CORE_UNINITIALIZED &&
  877
+	    (RendererHasFocus() || TASInputHasFocus()))
878 878
 	{
879 879
 		int WiimoteId = -1;
880 880
 		// Toggle fullscreen
@@ -1045,7 +1045,7 @@ void CFrame::OnMouse(wxMouseEvent& event)
1045 1045
 #if defined(HAVE_X11) && HAVE_X11
1046 1046
 	if (Core::GetState() != Core::CORE_UNINITIALIZED)
1047 1047
 	{
1048  
-		if(event.Dragging())
  1048
+		if (event.Dragging())
1049 1049
 			X11Utils::SendMotionEvent(X11Utils::XDisplayFromHandle(GetHandle()),
1050 1050
 					event.GetPosition().x, event.GetPosition().y);
1051 1051
 		else
@@ -1055,7 +1055,7 @@ void CFrame::OnMouse(wxMouseEvent& event)
1055 1055
 #endif
1056 1056
 
1057 1057
 	// next handlers are all for FreeLook, so we don't need to check them if disabled
1058  
-	if(!g_Config.bFreeLook)
  1058
+	if (!g_Config.bFreeLook)
1059 1059
 	{
1060 1060
 		event.Skip();
1061 1061
 		return;
@@ -1066,28 +1066,28 @@ void CFrame::OnMouse(wxMouseEvent& event)
1066 1066
 	static bool mouseMoveEnabled = false;
1067 1067
 	static float lastMouse[2];
1068 1068
 
1069  
-	if(event.MiddleDown())
  1069
+	if (event.MiddleDown())
1070 1070
 	{
1071 1071
 		lastMouse[0] = event.GetX();
1072 1072
 		lastMouse[1] = event.GetY();
1073 1073
 		mouseMoveEnabled = true;
1074 1074
 	}
1075  
-	else if(event.RightDown())
  1075
+	else if (event.RightDown())
1076 1076
 	{
1077 1077
 		lastMouse[0] = event.GetX();
1078 1078
 		lastMouse[1] = event.GetY();
1079 1079
 		mouseLookEnabled = true;
1080 1080
 	}
1081  
-	else if(event.MiddleUp())
  1081
+	else if (event.MiddleUp())
1082 1082
 	{
1083 1083
 		mouseMoveEnabled = false;
1084 1084
 	}
1085  
-	else if(event.RightUp())
  1085
+	else if (event.RightUp())
1086 1086
 	{
1087 1087
 		mouseLookEnabled = false;
1088 1088
 	}
1089 1089
 	// no button, so it's a move event
1090  
-	else if(event.GetButton() == wxMOUSE_BTN_NONE)
  1090
+	else if (event.GetButton() == wxMOUSE_BTN_NONE)
1091 1091
 	{
1092 1092
 		if (mouseLookEnabled)
1093 1093
 		{
14  Source/Core/DolphinWX/FrameAui.cpp
@@ -163,7 +163,7 @@ void CFrame::OnToggleWindow(wxCommandEvent& event)
163 163
 {
164 164
 	bool bShow = GetMenuBar()->IsChecked(event.GetId());
165 165
 
166  
-	switch(event.GetId())
  166
+	switch (event.GetId())
167 167
 	{
168 168
 		case IDM_LOGWINDOW:
169 169
 			if (!g_pCodeWindow)
@@ -228,7 +228,7 @@ void CFrame::OnNotebookPageChanged(wxAuiNotebookEvent& event)
228 228
 	// Update the notebook affiliation
229 229
 	for (int i = IDM_LOGWINDOW; i <= IDM_CODEWINDOW; i++)
230 230
 	{
231  
-		if(GetNotebookAffiliation(i) >= 0)
  231
+		if (GetNotebookAffiliation(i) >= 0)
232 232
 			g_pCodeWindow->iNbAffiliation[i - IDM_LOGWINDOW] = GetNotebookAffiliation(i);
233 233
 	}
234 234
 }
@@ -596,7 +596,7 @@ void CFrame::OnDropDownToolbarSelect(wxCommandEvent& event)
596 596
 {
597 597
 	ClearStatusBar();
598 598
 
599  
-	switch(event.GetId())
  599
+	switch (event.GetId())
600 600
 	{
601 601
 		case IDM_ADD_PERSPECTIVE:
602 602
 			{
@@ -693,7 +693,7 @@ void CFrame::TogglePaneStyle(bool On, int EventId)
693 693
 			Pane.PinButton(true);
694 694
 			Pane.Show();
695 695
 
696  
-			switch(EventId)
  696
+			switch (EventId)
697 697
 			{
698 698
 				case IDM_EDIT_PERSPECTIVES:
699 699
 					Pane.CaptionVisible(On);
@@ -977,7 +977,7 @@ wxWindow * CFrame::GetNotebookPageFromId(wxWindowID Id)
977 977
 			continue;
978 978
 
979 979
 		wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes()[i].window;
980  
-		for(u32 j = 0; j < NB->GetPageCount(); j++)
  980
+		for (u32 j = 0; j < NB->GetPageCount(); j++)
981 981
 		{
982 982
 			if (NB->GetPage(j)->GetId() == Id)
983 983
 				return NB->GetPage(j);
@@ -1024,7 +1024,7 @@ void CFrame::AddRemoveBlankPage()
1024 1024
 			continue;
1025 1025
 
1026 1026
 		wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes()[i].window;
1027  
-		for(u32 j = 0; j < NB->GetPageCount(); j++)
  1027
+		for (u32 j = 0; j < NB->GetPageCount(); j++)
1028 1028
 		{
1029 1029
 			if (NB->GetPageText(j).IsSameAs(wxT("<>")) && NB->GetPageCount() > 1)
1030 1030
 				NB->DeletePage(j);
@@ -1043,7 +1043,7 @@ int CFrame::GetNotebookAffiliation(wxWindowID Id)
1043 1043
 			continue;
1044 1044
 
1045 1045
 		wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes()[i].window;
1046  
-		for(u32 k = 0; k < NB->GetPageCount(); k++)
  1046
+		for (u32 k = 0; k < NB->GetPageCount(); k++)
1047 1047
 		{
1048 1048
 			if (NB->GetPage(k)->GetId() == Id)
1049 1049
 				return j;
30  Source/Core/DolphinWX/FrameTools.cpp
@@ -175,7 +175,7 @@ void CFrame::CreateMenu()
175 175
 
176 176
 	wxMenu *skippingMenu = new wxMenu;
177 177
 	emulationMenu->AppendSubMenu(skippingMenu, _("Frame S&kipping"));
178  
-	for(int i = 0; i < 10; i++)
  178
+	for (int i = 0; i < 10; i++)
179 179
 		skippingMenu->Append(IDM_FRAMESKIP0 + i, wxString::Format(wxT("%i"), i), wxEmptyString, wxITEM_RADIO);
180 180
 	skippingMenu->Check(IDM_FRAMESKIP0 + SConfig::GetInstance().m_FrameSkip, true);
181 181
 	Movie::SetFrameSkipping(SConfig::GetInstance().m_FrameSkip);
@@ -613,15 +613,15 @@ void CFrame::BootGame(const std::string& filename)
613 613
 			if (m_GameListCtrl->GetSelectedISO()->IsValid())
614 614
 				bootfile = m_GameListCtrl->GetSelectedISO()->GetFileName();
615 615
 		}
616  
-		else if (!StartUp.m_strDefaultGCM.empty()
617  
-				&& wxFileExists(wxSafeConvertMB2WX(StartUp.m_strDefaultGCM.c_str())))
  616
+		else if (!StartUp.m_strDefaultGCM.empty() &&
  617
+		         wxFileExists(wxSafeConvertMB2WX(StartUp.m_strDefaultGCM.c_str())))
618 618
 		{
619 619
 			bootfile = StartUp.m_strDefaultGCM;
620 620
 		}
621 621
 		else
622 622
 		{
623  
-			if (!SConfig::GetInstance().m_LastFilename.empty()
624  
-					&& wxFileExists(wxSafeConvertMB2WX(SConfig::GetInstance().m_LastFilename.c_str())))
  623
+			if (!SConfig::GetInstance().m_LastFilename.empty() &&
  624
+			    wxFileExists(wxSafeConvertMB2WX(SConfig::GetInstance().m_LastFilename.c_str())))
625 625
 			{
626 626
 				bootfile = SConfig::GetInstance().m_LastFilename;
627 627
 			}
@@ -716,7 +716,7 @@ void CFrame::OnFrameStep(wxCommandEvent& event)
716 716
 	Movie::DoFrameStep();
717 717
 
718 718
 	bool isPaused = (Core::GetState() == Core::CORE_PAUSE);
719  
-	if(isPaused && !wasPaused) // don't update on unpause, otherwise the status would be wrong when pausing next frame
  719
+	if (isPaused && !wasPaused) // don't update on unpause, otherwise the status would be wrong when pausing next frame
720 720
 		UpdateGUI();
721 721
 }
722 722
 
@@ -747,7 +747,7 @@ void CFrame::OnRecord(wxCommandEvent& WXUNUSED (event))
747 747
 			controllers |= (1 << (i + 4));
748 748
 	}
749 749
 
750  
-	if(Movie::BeginRecordingInput(controllers))
  750
+	if (Movie::BeginRecordingInput(controllers))
751 751
 		BootGame(std::string(""));
752 752
 }
753 753
 
@@ -761,7 +761,7 @@ void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED (event))
761 761
 			wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
762 762
 			this);
763 763
 
764  
-	if(path.IsEmpty())
  764
+	if (path.IsEmpty())
765 765
 		return;
766 766
 
767 767
 	if (!Movie::IsReadOnly())
@@ -878,7 +878,7 @@ void CFrame::ToggleDisplayMode(bool bFullscreen)
878 878
 	if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution != "Auto")
879 879
 		m_XRRConfig->ToggleDisplayMode(bFullscreen);
880 880
 #elif defined __APPLE__
881  
-	if(bFullscreen)
  881
+	if (bFullscreen)
882 882
 		CGDisplayHideCursor(CGMainDisplayID());
883 883
 	else
884 884
 		CGDisplayShowCursor(CGMainDisplayID());
@@ -1089,9 +1089,9 @@ void CFrame::DoStop()
1089 1089
 		}
1090 1090
 
1091 1091
 		// TODO: Show the author/description dialog here
1092  
-		if(Movie::IsRecordingInput())
  1092
+		if (Movie::IsRecordingInput())
1093 1093
 			DoRecordingSave();
1094  
-		if(Movie::IsPlayingInput() || Movie::IsRecordingInput())
  1094
+		if (Movie::IsPlayingInput() || Movie::IsRecordingInput())
1095 1095
 			Movie::EndPlayInput(false);
1096 1096
 		NetPlay::StopGame();
1097 1097
 
@@ -1180,7 +1180,7 @@ void CFrame::DoRecordingSave()
1180 1180
 			wxFD_SAVE | wxFD_PREVIEW | wxFD_OVERWRITE_PROMPT,
1181 1181
 			this);
1182 1182
 
1183  
-	if(path.IsEmpty())
  1183
+	if (path.IsEmpty())
1184 1184
 		return;
1185 1185
 
1186 1186
 	Movie::SaveRecording(WxStrToStr(path).c_str());
@@ -1392,7 +1392,7 @@ void CFrame::OnInstallWAD(wxCommandEvent& event)
1392 1392
 {
1393 1393
 	std::string fileName;
1394 1394
 
1395  
-	switch(event.GetId())
  1395
+	switch (event.GetId())
1396 1396
 	{
1397 1397
 	case IDM_LIST_INSTALLWAD:
1398 1398
 	{
@@ -1709,8 +1709,8 @@ void CFrame::UpdateGUI()
1709 1709
 				GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(true);
1710 1710
 			}
1711 1711
 			// Prepare to load last selected file, enable play button
1712  
-			else if (!SConfig::GetInstance().m_LastFilename.empty()
1713  
-					&& wxFileExists(wxSafeConvertMB2WX(SConfig::GetInstance().m_LastFilename.c_str())))
  1712
+			else if (!SConfig::GetInstance().m_LastFilename.empty() &&
  1713
+			         wxFileExists(wxSafeConvertMB2WX(SConfig::GetInstance().m_LastFilename.c_str())))
1714 1714
 			{
1715 1715
 				if (m_ToolBar)
1716 1716
 					m_ToolBar->EnableTool(IDM_PLAY, true);
4  Source/Core/DolphinWX/GLInterface/AGL.cpp
@@ -97,8 +97,8 @@ void cInterfaceAGL::Update()
97 97
 	size.width *= scale;
98 98
 	size.height *= scale;
99 99
 
100  
-	if( s_backbuffer_width == size.width
101  
-	   && s_backbuffer_height == size.height)
  100
+	if (s_backbuffer_width == size.width &&
  101
+	    s_backbuffer_height == size.height)
102 102
 		return;
103 103
 
104 104
 	s_backbuffer_width = size.width;
10  Source/Core/DolphinWX/GLInterface/EGL.cpp
@@ -93,7 +93,7 @@ bool cInterfaceEGL::Create(void *&window_handle)
93 93
 	const char *s;
94 94
 	EGLint egl_major, egl_minor;
95 95
 
96  
-	if(!Platform.SelectDisplay())
  96
+	if (!Platform.SelectDisplay())
97 97
 		return false;
98 98
 
99 99
 	GLWin.egl_dpy = Platform.EGLGetDisplay();
@@ -131,7 +131,7 @@ bool cInterfaceEGL::Create(void *&window_handle)
131 131
 		EGL_CONTEXT_CLIENT_VERSION, 2,
132 132
 		EGL_NONE
133 133
 	};
134  
-	switch(s_opengl_mode)
  134
+	switch (s_opengl_mode)
135 135
 	{
136 136
 		case MODE_OPENGL:
137 137
 			attribs[1] = EGL_OPENGL_BIT;
@@ -212,11 +212,11 @@ void cInterfaceEGL::Shutdown()
212 212
 	if (GLWin.egl_ctx)
213 213
 	{
214 214
 		eglMakeCurrent(GLWin.egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
215  
-		if(!eglDestroyContext(GLWin.egl_dpy, GLWin.egl_ctx))
  215
+		if (!eglDestroyContext(GLWin.egl_dpy, GLWin.egl_ctx))
216 216
 			NOTICE_LOG(VIDEO, "Could not destroy drawing context.");
217  
-		if(!eglDestroySurface(GLWin.egl_dpy, GLWin.egl_surf))
  217
+		if (!eglDestroySurface(GLWin.egl_dpy, GLWin.egl_surf))
218 218
 			NOTICE_LOG(VIDEO, "Could not destroy window surface.");
219  
-		if(!eglTerminate(GLWin.egl_dpy))
  219
+		if (!eglTerminate(GLWin.egl_dpy))
220 220
 			NOTICE_LOG(VIDEO, "Could not destroy display connection.");
221 221
 		GLWin.egl_ctx = nullptr;
222 222
 	}
2  Source/Core/DolphinWX/GLInterface/X11_Util.cpp
@@ -161,7 +161,7 @@ void cX11Window::XEventThread()
161 161
 		for (int num_events = XPending(GLWin.evdpy); num_events > 0; num_events--)
162 162
 		{
163 163
 			XNextEvent(GLWin.evdpy, &event);
164  
-			switch(event.type) {
  164
+			switch (event.type) {
165 165
 				case ConfigureNotify:
166 166
 					GLInterface->SetBackBufferDimensions(event.xconfigure.width, event.xconfigure.height);
167 167
 					break;
26  Source/Core/DolphinWX/GameListCtrl.cpp
@@ -120,7 +120,7 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
120 120
 		indexOther = SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage;
121 121
 	}
122 122
 
123  
-	switch(sortData)
  123
+	switch (sortData)
124 124
 	{
125 125
 		case CGameListCtrl::COLUMN_TITLE:
126 126
 			if (!strcasecmp(iso1->GetName(indexOne).c_str(),iso2->GetName(indexOther).c_str()))
@@ -143,9 +143,9 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
143 143
 				return strcasecmp(cmp1.c_str(), cmp2.c_str()) * t;
144 144
 			}
145 145
 		case CGameListCtrl::COLUMN_COUNTRY:
146  
-			if(iso1->GetCountry() > iso2->GetCountry())
  146
+			if (iso1->GetCountry() > iso2->GetCountry())
147 147
 				return  1 * t;
148  
-			if(iso1->GetCountry() < iso2->GetCountry())
  148
+			if (iso1->GetCountry() < iso2->GetCountry())
149 149
 				return -1 * t;
150 150
 			return 0;
151 151
 		case CGameListCtrl::COLUMN_SIZE:
@@ -155,9 +155,9 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
155 155
 				return -1 * t;
156 156
 			return 0;
157 157
 		case CGameListCtrl::COLUMN_PLATFORM:
158  
-			if(iso1->GetPlatform() > iso2->GetPlatform())
  158
+			if (iso1->GetPlatform() > iso2->GetPlatform())
159 159
 				return  1 * t;
160  
-			if(iso1->GetPlatform() < iso2->GetPlatform())
  160
+			if (iso1->GetPlatform() < iso2->GetPlatform())
161 161
 				return -1 * t;
162 162
 			return 0;
163 163
 
@@ -471,7 +471,7 @@ wxColour blend50(const wxColour& c1, const wxColour& c2)
471 471
 
472 472
 void CGameListCtrl::SetBackgroundColor()
473 473
 {
474  
-	for(long i = 0; i < GetItemCount(); i++)
  474
+	for (long i = 0; i < GetItemCount(); i++)
475 475
 	{
476 476
 		wxColour color = (i & 1) ?
477 477
 			blend50(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT),
@@ -564,7 +564,7 @@ void CGameListCtrl::ScanForISOs()
564 564
 			{
565 565
 				bool list = true;
566 566
 
567  
-				switch(ISOFile.GetPlatform())
  567
+				switch (ISOFile.GetPlatform())
568 568
 				{
569 569
 					case GameListItem::WII_DISC:
570 570
 						if (!SConfig::GetInstance().m_ListWii)
@@ -580,7 +580,7 @@ void CGameListCtrl::ScanForISOs()
580 580
 						break;
581 581
 				}
582 582
 
583  
-				switch(ISOFile.GetCountry())
  583
+				switch (ISOFile.GetCountry())
584 584
 				{
585 585
 					case DiscIO::IVolume::COUNTRY_TAIWAN:
586 586
 						if (!SConfig::GetInstance().m_ListTaiwan)
@@ -665,7 +665,7 @@ int wxCALLBACK wxListCompare(long item1, long item2, long sortData)
665 665
 
666 666
 void CGameListCtrl::OnColumnClick(wxListEvent& event)
667 667
 {
668  
-	if(event.GetColumn() != COLUMN_BANNER)
  668
+	if (event.GetColumn() != COLUMN_BANNER)
669 669
 	{
670 670
 		int current_column = event.GetColumn();
671 671
 		if (sorted)
@@ -876,7 +876,7 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
876 876
 			popupMenu->AppendCheckItem(IDM_SETDEFAULTGCM, _("Set as &default ISO"));
877 877
 
878 878
 			// First we have to decide a starting value when we append it
879  
-			if(selected_iso->GetFileName() == SConfig::GetInstance().
  879
+			if (selected_iso->GetFileName() == SConfig::GetInstance().
880 880
 				m_LocalCoreStartupParameter.m_strDefaultGCM)
881 881
 				popupMenu->FindItem(IDM_SETDEFAULTGCM)->Check();
882 882
 
@@ -887,8 +887,8 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
887 887
 			{
888 888
 				if (selected_iso->IsCompressed())
889 889
 					popupMenu->Append(IDM_COMPRESSGCM, _("Decompress ISO..."));
890  
-				else if (selected_iso->GetFileName().substr(selected_iso->GetFileName().find_last_of(".")) != ".ciso"
891  
-						 && selected_iso->GetFileName().substr(selected_iso->GetFileName().find_last_of(".")) != ".wbfs")
  890
+				else if (selected_iso->GetFileName().substr(selected_iso->GetFileName().find_last_of(".")) != ".ciso" &&
  891
+				         selected_iso->GetFileName().substr(selected_iso->GetFileName().find_last_of(".")) != ".wbfs")
892 892
 					popupMenu->Append(IDM_COMPRESSGCM, _("Compress ISO..."));
893 893
 			}
894 894
 			else
@@ -1039,7 +1039,7 @@ void CGameListCtrl::OnProperties(wxCommandEvent& WXUNUSED (event))
1039 1039
 		return;
1040 1040
 
1041 1041
 	CISOProperties ISOProperties(iso->GetFileName(), this);
1042  
-	if(ISOProperties.ShowModal() == wxID_OK)
  1042
+	if (ISOProperties.ShowModal() == wxID_OK)
1043 1043
 		Update();
1044 1044
 }
1045 1045
 
6  Source/Core/DolphinWX/HotkeyDlg.cpp
@@ -75,7 +75,7 @@ void HotkeyConfigDialog::EndGetButtons(void)
75 75
 
76 76
 void HotkeyConfigDialog::OnKeyDown(wxKeyEvent& event)
77 77
 {
78  
-	if(ClickedButton != nullptr)
  78
+	if (ClickedButton != nullptr)
79 79
 	{
80 80
 		// Save the key
81 81
 		g_Pressed = event.GetKeyCode();
@@ -136,9 +136,9 @@ void HotkeyConfigDialog::DoGetButtons(int _GetId)
136 136
 	const int TimesPerSecond = 40; // How often to run the check
137 137
 
138 138
 	// If the Id has changed or the timer is not running we should start one
139  
-	if( GetButtonWaitingID != _GetId || !m_ButtonMappingTimer->IsRunning() )
  139
+	if ( GetButtonWaitingID != _GetId || !m_ButtonMappingTimer->IsRunning() )
140 140
 	{
141  
-		if(m_ButtonMappingTimer->IsRunning())
  141
+		if (m_ButtonMappingTimer->IsRunning())
142 142
 			m_ButtonMappingTimer->Stop();
143 143
 
144 144
 		// Save the button Id
32  Source/Core/DolphinWX/ISOProperties.cpp
@@ -169,7 +169,7 @@ struct WiiPartition
169 169
 	{
170 170
 		char tmp[17];
171 171
 		u8 _tTitleID[8];
172  
-		if(OpenISO->GetTitleID(_tTitleID))
  172
+		if (OpenISO->GetTitleID(_tTitleID))
173 173
 		{
174 174
 			snprintf(tmp, 17, "%016" PRIx64, Common::swap64(_tTitleID));
175 175
 			_iniFilename = tmp;
@@ -330,7 +330,7 @@ size_t CISOProperties::CreateDirectoryTree(wxTreeItemId& parent,
330 330
 
331 331
 		char *itemName = strrchr(name, DIR_SEP_CHR);
332 332
 
333  
-		if(!itemName)
  333
+		if (!itemName)
334 334
 			itemName = name;
335 335
 		else
336 336
 			itemName++;
@@ -678,8 +678,8 @@ void CISOProperties::OnRightClickOnTree(wxTreeEvent& event)
678 678
 
679 679
 	wxMenu* popupMenu = new wxMenu;
680 680
 
681  
-	if (m_Treectrl->GetItemImage(m_Treectrl->GetSelection()) == 0
682  
-		&& m_Treectrl->GetFirstVisibleItem() != m_Treectrl->GetSelection())
  681
+	if (m_Treectrl->GetItemImage(m_Treectrl->GetSelection()) == 0 &&
  682
+	    m_Treectrl->GetFirstVisibleItem() != m_Treectrl->GetSelection())
683 683
 	{
684 684
 		popupMenu->Append(IDM_EXTRACTDIR, _("Extract Partition..."));
685 685
 	}
@@ -694,8 +694,8 @@ void CISOProperties::OnRightClickOnTree(wxTreeEvent& event)
694 694
 
695 695
 	popupMenu->Append(IDM_EXTRACTALL, _("Extract All Files..."));
696 696
 
697  
-	if (m_Treectrl->GetItemImage(m_Treectrl->GetSelection()) == 0
698  
-		&& m_Treectrl->GetFirstVisibleItem() != m_Treectrl->GetSelection())
  697
+	if (m_Treectrl->GetItemImage(m_Treectrl->GetSelection()) == 0 &&
  698
+	    m_Treectrl->GetFirstVisibleItem() != m_Treectrl->GetSelection())
699 699
 	{
700 700
 		popupMenu->AppendSeparator();
701 701
 		popupMenu->Append(IDM_EXTRACTAPPLOADER, _("Extract Apploader..."));
@@ -772,7 +772,7 @@ void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolde
772 772
 	}
773 773
 	else // Look for the dir we are going to extract
774 774
 	{
775  
-		for(index[0] = 0; index[0] < fst.size(); index[0]++)
  775
+		for (index[0] = 0; index[0] < fst.size(); index[0]++)
776 776
 		{
777 777
 			if (!strcmp(fst.at(index[0])->m_FullPath, _rFullPath))
778 778
 			{
@@ -896,7 +896,7 @@ void CISOProperties::OnExtractDataFromHeader(wxCommandEvent& event)
896 896
 		std::size_t partitionNum = (std::size_t)wxAtoi(Directory.Mid(Directory.find_first_of("/"), 1));
897 897
 		Directory.Remove(0, Directory.find_first_of("/") +1); // Remove "Partition x/"
898 898
 
899  
-		if(WiiDisc.size() > partitionNum)
  899
+		if (WiiDisc.size() > partitionNum)
900 900
 		{
901 901
 			// Get the filesystem of the LAST partition
902 902
 			FS = WiiDisc.at(partitionNum).FileSystem;
@@ -1153,10 +1153,10 @@ void CISOProperties::LaunchExternalEditor(const std::string& filename)
1153 1153
 		withApplication: @"TextEdit"];
1154 1154
 #else
1155 1155
 	wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("ini"));
1156  
-	if(filetype == nullptr) // From extension failed, trying with MIME type now
  1156
+	if (filetype == nullptr) // From extension failed, trying with MIME type now
1157 1157
 	{
1158 1158
 		filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType(_T("text/plain"));
1159  
-		if(filetype == nullptr) // MIME type failed, aborting mission
  1159
+		if (filetype == nullptr) // MIME type failed, aborting mission
1160 1160
 		{
1161 1161
 			PanicAlertT("Filetype 'ini' is unknown! Will not open!");
1162 1162
 			return;
@@ -1164,10 +1164,10 @@ void CISOProperties::LaunchExternalEditor(const std::string& filename)
1164 1164
 	}
1165 1165
 	wxString OpenCommand;
1166 1166
 	OpenCommand = filetype->GetOpenCommand(StrToWxStr(filename));
1167  
-	if(OpenCommand.IsEmpty())
  1167
+	if (OpenCommand.IsEmpty())
1168 1168
 		PanicAlertT("Couldn't find open command for extension 'ini'!");
1169 1169
 	else
1170  
-		if(wxExecute(OpenCommand, wxEXEC_SYNC) == -1)
  1170
+		if (wxExecute(OpenCommand, wxEXEC_SYNC) == -1)
1171 1171
 			PanicAlertT("wxExecute returned -1 on application run!");
1172 1172
 #endif
1173 1173
 
@@ -1201,8 +1201,8 @@ void CISOProperties::ListSelectionChanged(wxCommandEvent& event)
1201 1201
 	switch (event.GetId())
1202 1202
 	{
1203 1203
 	case ID_PATCHES_LIST:
1204  
-		if (Patches->GetSelection() == wxNOT_FOUND
1205  
-		        || DefaultPatches.find(Patches->GetString(Patches->GetSelection()).ToStdString()) != DefaultPatches.end())
  1204
+		if (Patches->GetSelection() == wxNOT_FOUND ||
  1205
+		    DefaultPatches.find(Patches->GetString(Patches->GetSelection()).ToStdString()) != DefaultPatches.end())
1206 1206
 		{
1207 1207
 			EditPatch->Disable();
1208 1208
 			RemovePatch->Disable();
@@ -1214,8 +1214,8 @@ void CISOProperties::ListSelectionChanged(wxCommandEvent& event)
1214 1214
 		}
1215 1215
 		break;
1216 1216
 	case ID_CHEATS_LIST:
1217  
-		if (Cheats->GetSelection() == wxNOT_FOUND
1218  
-		        || DefaultCheats.find(Cheats->GetString(Cheats->GetSelection()).ToStdString()) != DefaultCheats.end())
  1217
+		if (Cheats->GetSelection() == wxNOT_FOUND ||
  1218
+		    DefaultCheats.find(Cheats->GetString(Cheats->GetSelection()).ToStdString()) != DefaultCheats.end())
1219 1219
 		{
1220 1220
 			EditCheat->Disable();
1221 1221
 			RemoveCheat->Disable();
6  Source/Core/DolphinWX/Main.cpp
@@ -424,7 +424,7 @@ void DolphinApp::InitLanguageSupport()
424 424
 	ini.Get("Interface", "Language", &language, wxLANGUAGE_DEFAULT);
425 425
 
426 426
 	// Load language if possible, fall back to system default otherwise
427  
-	if(wxLocale::IsAvailable(language))
  427
+	if (wxLocale::IsAvailable(language))
428 428
 	{
429 429
 		m_locale = new wxLocale(language);
430 430
 
@@ -434,7 +434,7 @@ void DolphinApp::InitLanguageSupport()
434 434
 
435 435
 		m_locale->AddCatalog(wxT("dolphin-emu"));
436 436
 
437  
-		if(!m_locale->IsOk())
  437
+		if (!m_locale->IsOk())
438 438
 		{
439 439
 			PanicAlertT("Error loading selected language. Falling back to system default.");
440 440
 			delete m_locale;
@@ -688,7 +688,7 @@ void Host_SetWiiMoteConnectionState(int _State)
688 688
 
689 689
 	wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATESTATUSBAR);
690 690
 
691  
-	switch(_State)
  691
+	switch (_State)
692 692
 	{
693 693
 	case 0: event.SetString(_("Not connected")); break;
694 694
 	case 1: event.SetString(_("Connecting...")); break;
4  Source/Core/DolphinWX/MainNoGUI.cpp
@@ -178,7 +178,7 @@ void X11_MainLoop()
178 178
 		for (int num_events = XPending(dpy); num_events > 0; num_events--)
179 179
 		{
180 180
 			XNextEvent(dpy, &event);
181  
-			switch(event.type)
  181
+			switch (event.type)
182 182
 			{
183 183
 				case KeyPress:
184 184
 					key = XLookupKeysym((XKeyEvent*)&event, 0);
@@ -269,7 +269,7 @@ void X11_MainLoop()
269 269
 void Wayland_MainLoop()
270 270
 {
271 271
 	// Wait for display to be initialized
272  
-	while(!GLWin.wl_display)
  272
+	while (!GLWin.wl_display)
273 273
 		usleep(20000);
274 274
 
275 275
 	GLWin.running = 1;
10  Source/Core/DolphinWX/MemcardManager.cpp
@@ -165,7 +165,7 @@ bool CMemcardManager::LoadSettings()
165 165
 
166 166
 		mcmSettings.column[NUMBER_OF_COLUMN] = false;
167 167
 
168  
-		for(int i = COLUMN_GAMECODE; i < NUMBER_OF_COLUMN; i++)
  168
+		for (int i = COLUMN_GAMECODE; i < NUMBER_OF_COLUMN; i++)
169 169
 		{
170 170
 			mcmSettings.column[i] = mcmSettings.column[NUMBER_OF_COLUMN];
171 171
 		}
@@ -300,7 +300,7 @@ void CMemcardManager::ChangePath(int slot)
300 300
 	}
301 301
 	if (!m_MemcardPath[SLOT_A]->GetPath().CmpNoCase(m_MemcardPath[SLOT_B]->GetPath()))
302 302
 	{
303  
-		if(m_MemcardPath[slot]->GetPath().length())
  303
+		if (m_MemcardPath[slot]->GetPath().length())
304 304
 			PanicAlertT("Memcard already opened");
305 305
 	}
306 306
 	else
@@ -384,7 +384,7 @@ void CMemcardManager::OnPageChange(wxCommandEvent& event)
384 384
 void CMemcardManager::OnMenuChange(wxCommandEvent& event)
385 385
 {
386 386
 	int _id = event.GetId();
387  
-	switch(_id)
  387
+	switch (_id)
388 388
 	{
389 389
 	case ID_MEMCARDPATH_A:
390 390
 	case ID_MEMCARDPATH_B:
@@ -601,8 +601,8 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
601 601
 		SplitPath(mpath, &path1, &path2, nullptr);
602 602
 		path1 += path2;
603 603
 		File::CreateDir(path1);
604  
-		if(PanicYesNoT("Warning: This will overwrite any existing saves that are in the folder:\n"
605  
-					"%s\nand have the same name as a file on your memcard\nContinue?", path1.c_str()))
  604
+		if (PanicYesNoT("Warning: This will overwrite any existing saves that are in the folder:\n"
  605
+		                "%s\nand have the same name as a file on your memcard\nContinue?", path1.c_str()))
606 606
 		for (int i = 0; i < DIRLEN; i++)
607 607
 		{
608 608
 			CopyDeleteSwitch(memoryCard[slot]->ExportGci(i, nullptr, path1), -1);
8  Source/Core/DolphinWX/MemoryCards/WiiSaveCrypted.cpp
@@ -303,7 +303,7 @@ void CWiiSaveCrypted::ImportWiiSaveFiles()
303 303
 
304 304
 	FileHDR _tmpFileHDR;
305 305
 
306  
-	for(u32 i = 0; i < _numberOfFiles; i++)
  306
+	for (u32 i = 0; i < _numberOfFiles; i++)
307 307
 	{
308 308
 		memset(&_tmpFileHDR, 0, FILE_HDR_SZ);
309 309
 		memset(IV, 0, 0x10);
@@ -365,7 +365,7 @@ void CWiiSaveCrypted::ExportWiiSaveFiles()
365 365
 {
366 366
 	if (!b_valid) return;
367 367
 
368  
-	for(u32 i = 0; i < _numberOfFiles; i++)
  368
+	for (u32 i = 0; i < _numberOfFiles; i++)
369 369
 	{
370 370
 		FileHDR tmpFileHDR;
371 371
 		std::string __name;
@@ -558,14 +558,14 @@ bool CWiiSaveCrypted::getPaths(bool forExport)
558 558
 			(u8)(m_TitleID >> 24) & 0xFF, (u8)(m_TitleID >> 16) & 0xFF,
559 559
 			(u8)(m_TitleID >>  8) & 0xFF, (u8)m_TitleID & 0xFF);
560 560
 
561  
-		if(!File::IsDirectory(WiiTitlePath))
  561
+		if (!File::IsDirectory(WiiTitlePath))
562 562
 		{
563 563
 			b_valid = false;
564 564
 			PanicAlertT("No save folder found for title %s", GameID);
565 565
 			return false;
566 566
 		}
567 567
 
568  
-		if(!File::Exists(WiiTitlePath + "banner.bin"))
  568
+		if (!File::Exists(WiiTitlePath + "banner.bin"))
569 569
 		{
570 570
 			b_valid = false;
571 571
 			PanicAlertT("No banner file found for title  %s", GameID);
2  Source/Core/DolphinWX/NetWindow.cpp
@@ -277,7 +277,7 @@ void NetPlaySetupDiag::OnHost(wxCommandEvent&)
277 277
 	if (netplay_server->is_connected)
278 278
 	{
279 279
 #ifdef USE_UPNP
280  
-		if(m_upnp_chk->GetValue())
  280
+		if (m_upnp_chk->GetValue())
281 281
 			netplay_server->TryPortmapping(port);
282 282
 #endif
283 283
 		MakeNetPlayDiag(port, game, true);
227  Source/Core/DolphinWX/TASInputDlg.cpp
@@ -244,148 +244,148 @@ void TASInputDlg::ResetValues()
244 244
 
245 245
 void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
246 246
 {
247  
-	if(PadStatus->stickX != 128)
  247
+	if (PadStatus->stickX != 128)
248 248
 	{
249 249
 		mainX = PadStatus->stickX;
250 250
 		mstickx = true;
251 251
 		wx_mainX_t->SetValue(wxString::Format(wxT("%i"), mainX));
252 252
 	}
253 253
 
254  
-	else if(mstickx)
  254
+	else if (mstickx)
255 255
 	{
256 256
 		mstickx = false;
257 257
 		mainX = 128;
258 258
 		wx_mainX_t->SetValue(wxString::Format(wxT("%i"), mainX));
259 259
 	}
260 260
 
261  
-	if(PadStatus->stickY != 128)
  261
+	if (PadStatus->stickY != 128)
262 262
 	{
263 263
 		mainY = PadStatus->stickY;
264 264
 		msticky = true;
265 265
 		wx_mainY_t->SetValue(wxString::Format(wxT("%i"),mainY));
266 266
 	}
267  
-	else if(msticky)
  267
+	else if (msticky)
268 268
 	{
269 269
 		msticky = false;
270 270
 		mainY = 128;
271 271
 		wx_mainY_t->SetValue(wxString::Format(wxT("%i"), mainY));
272 272
 	}
273 273
 
274  
-	if(PadStatus->substickX != 128)
  274
+	if (PadStatus->substickX != 128)
275 275
 	{
276 276
 		cX = PadStatus->substickX;
277 277
 		cstickx = true;
278 278
 		wx_cX_t->SetValue(wxString::Format(wxT("%i"), cX));
279 279
 	}
280  
-	else if(cstickx)
  280
+	else if (cstickx)
281 281
 	{
282 282
 		cstickx = false;
283 283
 		cX = 128;
284 284
 		wx_cX_t->SetValue(wxString::Format(wxT("%i"), cX));
285 285
 	}
286 286
 
287  
-	if(PadStatus->substickY != 128)
  287
+	if (PadStatus->substickY != 128)
288 288
 	{
289 289
 		cY = PadStatus->substickY;
290 290
 		csticky = true;
291 291
 		wx_cY_t->SetValue(wxString::Format(wxT("%i"), cY));
292 292
 	}
293  
-	else if(csticky)
  293
+	else if (csticky)
294 294
 	{
295 295
 		csticky = false;
296 296
 		cY = 128;
297 297
 		wx_cY_t->SetValue(wxString::Format(wxT("%i"), cY));
298 298
 	}
299 299
 
300  
-	if(((PadStatus->button & PAD_BUTTON_UP) != 0))
  300
+	if ((PadStatus->button & PAD_BUTTON_UP) != 0)
301 301
 	{
302 302
 		wx_up_button->SetValue(true);
303 303
 		DU_cont = true;
304 304
 	}
305  
-	else if(DU_cont)
  305
+	else if (DU_cont)
306 306
 	{
307 307
 		wx_up_button->SetValue(false);
308 308
 		DU_cont = false;
309 309
 	}
310 310
 
311  
-	if(((PadStatus->button & PAD_BUTTON_DOWN) != 0))
  311
+	if ((PadStatus->button & PAD_BUTTON_DOWN) != 0)
312 312
 	{
313 313
 		wx_down_button->SetValue(true);
314 314
 		DD_cont = true;
315 315
 	}
316  
-	else if(DD_cont)
  316
+	else if (DD_cont)
317 317
 	{
318 318
 		wx_down_button->SetValue(false);
319 319
 		DD_cont = false;
320 320
 	}
321 321
 
322  
-	if(((PadStatus->button & PAD_BUTTON_LEFT) != 0))
  322
+	if ((PadStatus->button & PAD_BUTTON_LEFT) != 0)
323 323
 	{
324 324
 		wx_left_button->SetValue(true);
325 325
 		DL_cont = true;
326 326
 	}
327  
-	else if(DL_cont)
  327
+	else if (DL_cont)
328 328
 	{
329 329
 		wx_left_button->SetValue(false);
330 330
 		DL_cont = false;
331 331
 	}
332 332
 
333  
-	if(((PadStatus->button & PAD_BUTTON_RIGHT) != 0))
  333
+	if ((PadStatus->button & PAD_BUTTON_RIGHT) != 0)
334 334
 	{
335 335
 		wx_right_button->SetValue(true);
336 336
 		DR_cont = true;
337 337
 	}
338  
-	else if(DR_cont)
  338
+	else if (DR_cont)
339 339
 	{
340 340
 		wx_right_button->SetValue(false);
341 341
 		DR_cont = false;
342 342
 	}
343 343
 
344  
-	if(((PadStatus->button & PAD_BUTTON_A) != 0))
  344
+	if ((PadStatus->button & PAD_BUTTON_A) != 0)
345 345
 	{
346 346
 		wx_a_button->SetValue(true);
347 347
 		A_cont = true;
348 348
 	}
349  
-	else if(A_cont)
  349
+	else if (A_cont)
350 350
 	{
351 351
 		wx_a_button->SetValue(false);
352 352
 		A_cont = false;
353 353
 	}
354 354
 
355  
-	if(((PadStatus->button & PAD_BUTTON_B) != 0))
  355
+	if ((PadStatus->button & PAD_BUTTON_B) != 0)
356 356
 	{
357 357
 		wx_b_button->SetValue(true);
358 358
 		B_cont = true;
359 359
 	}
360  
-	else if(B_cont)
  360
+	else if (B_cont)
361 361
 	{
362 362
 		wx_b_button->SetValue(false);
363 363
 		B_cont = false;
364 364
 	}
365 365
 
366  
-	if(((PadStatus->button & PAD_BUTTON_X) != 0))
  366
+	if ((PadStatus->button & PAD_BUTTON_X) != 0)
367 367
 	{
368 368
 		wx_x_button->SetValue(true);
369 369
 		X_cont = true;
370 370
 	}
371  
-	else if(X_cont)
  371
+	else if (X_cont)
372 372
 	{
373 373
 		wx_x_button->SetValue(false);
374 374
 		X_cont = false;
375 375
 	}
376 376
 
377  
-	if(((PadStatus->button & PAD_BUTTON_Y) != 0))
  377
+	if ((PadStatus->button & PAD_BUTTON_Y) != 0)
378 378
 	{
379 379
 		wx_y_button->SetValue(true);
380 380
 		Y_cont = true;
381 381
 	}
382  
-	else if(Y_cont)
  382
+	else if (Y_cont)
383 383
 	{
384 384
 		wx_y_button->SetValue(false);
385 385
 		Y_cont = false;
386 386
 	}
387 387
 
388  
-	if(((PadStatus->triggerLeft) != 0))
  388
+	if ((PadStatus->triggerLeft) != 0)
389 389
 	{
390 390
 		if (PadStatus->triggerLeft == 255)
391 391
 		{
@@ -402,7 +402,7 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
402 402
 		wx_l_t->SetValue(wxString::Format(wxT("%i"), PadStatus->triggerLeft));
403 403
 		L_cont = true;
404 404
 	}
405  
-	else if(L_cont)
  405
+	else if (L_cont)
406 406
 	{
407 407
 		wx_l_button->SetValue(false);
408 408
 		wx_l_s->SetValue(0);
@@ -410,7 +410,7 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
410 410
 		L_cont = false;
411 411
 	}
412 412
 
413  
-	if(((PadStatus->triggerRight) != 0))
  413
+	if ((PadStatus->triggerRight) != 0)
414 414
 	{
415 415
 		if (PadStatus->triggerRight == 255)
416 416
 		{
@@ -427,7 +427,7 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
427 427
 		wx_r_t->SetValue(wxString::Format(wxT("%i"), PadStatus->triggerRight));
428 428
 		R_cont = true;
429 429
 	}
430  
-	else if(R_cont)
  430
+	else if (R_cont)
431 431
 	{
432 432
 		wx_r_button->SetValue(false);
433 433
 		wx_r_s->SetValue(0);
@@ -435,23 +435,23 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
435 435
 		R_cont = false;
436 436
 	}
437 437
 
438  
-	if(((PadStatus->button & PAD_TRIGGER_Z) != 0))
  438
+	if ((PadStatus->button & PAD_TRIGGER_Z) != 0)
439 439
 	{
440 440
 		wx_z_button->SetValue(true);
441 441
 		Z_cont = true;
442 442
 	}
443  
-	else if(Z_cont)
  443
+	else if (Z_cont)
444 444
 	{
445 445
 		wx_z_button->SetValue(false);
446 446
 		Z_cont = false;
447 447
 	}
448 448
 
449  
-	if(((PadStatus->button & PAD_BUTTON_START) != 0))
  449
+	if ((PadStatus->button & PAD_BUTTON_START) != 0)
450 450
 	{
451 451
 		wx_start_button->SetValue(true);
452 452
 		START_cont = true;
453 453
 	}
454  
-	else if(START_cont)
  454
+	else if (START_cont)
455 455
 	{
456 456
 		wx_start_button->SetValue(false);
457 457
 		START_cont = false;
@@ -487,27 +487,27 @@ void TASInputDlg::GetValues(SPADStatus *PadStatus, int controllerID)
487 487
 	PadStatus->triggerLeft = lTrig;
488 488
 	PadStatus->triggerRight = rTrig;
489 489
 
490  
-	if(wx_up_button->IsChecked())
  490
+	if (wx_up_button->IsChecked())
491 491
 		PadStatus->button |= PAD_BUTTON_UP;
492 492
 	else
493 493
 		PadStatus->button &= ~PAD_BUTTON_UP;
494 494
 
495  
-	if(wx_down_button->IsChecked())
  495
+	if (wx_down_button->IsChecked())
496 496
 		PadStatus->button |= PAD_BUTTON_DOWN;
497 497
 	else
498 498
 		PadStatus->button &= ~PAD_BUTTON_DOWN;
499 499
 
500  
-	if(wx_left_button->IsChecked())
  500
+	if (wx_left_button->IsChecked())
501 501
 		PadStatus->button |= PAD_BUTTON_LEFT;
502 502
 	else
503 503
 		PadStatus->button &= ~PAD_BUTTON_LEFT;
504 504
 
505  
-	if(wx_right_button->IsChecked())
  505
+	if (wx_right_button->IsChecked())
506 506
 		PadStatus->button |= PAD_BUTTON_RIGHT;
507 507
 	else
508 508
 		PadStatus->button &= ~PAD_BUTTON_RIGHT;
509 509
 
510  
-	if(wx_a_button->IsChecked())
  510
+	if (wx_a_button->IsChecked())
511 511
 	{
512 512
 		PadStatus->button |= PAD_BUTTON_A;
513 513
 		PadStatus->analogA = 0xFF;
@@ -518,7 +518,7 @@ void TASInputDlg::GetValues(SPADStatus *PadStatus, int controllerID)
518 518
 		PadStatus->analogA = 0x00;
519 519
 	}
520 520
 
521  
-	if(wx_b_button->IsChecked())
  521
+	if (wx_b_button->IsChecked())
522 522
 	{
523 523
 		PadStatus->button |= PAD_BUTTON_B;
524 524
 		PadStatus->analogB = 0xFF;
@@ -529,32 +529,32 @@ void TASInputDlg::GetValues(SPADStatus *PadStatus, int controllerID)
529 529
 		PadStatus->analogB = 0x00;
530 530
 	}
531 531
 
532  
-	if(wx_x_button->IsChecked())
  532
+	if (wx_x_button->IsChecked())
533 533
 		PadStatus->button |= PAD_BUTTON_X;
534 534
 	else
535 535
 		PadStatus->button &= ~PAD_BUTTON_X;
536 536
 
537  
-	if(wx_y_button->IsChecked())
  537
+	if (wx_y_button->IsChecked())
538 538
 		PadStatus->button |= PAD_BUTTON_Y;
539 539
 	else
540 540
 		PadStatus->button &= ~PAD_BUTTON_Y;
541 541
 
542  
-	if(wx_z_button->IsChecked())
  542
+	if (wx_z_button->IsChecked())
543 543
 		PadStatus->button |= PAD_TRIGGER_Z;
544 544
 	else
545 545
 		PadStatus->button &= ~PAD_TRIGGER_Z;
546 546
 
547  
-	if(wx_start_button->IsChecked())
  547
+	if (wx_start_button->IsChecked())
548 548
 		PadStatus->button |= PAD_BUTTON_START;
549 549
 	else
550 550
 		PadStatus->button &= ~PAD_BUTTON_START;
551 551
 
552  
-	if(wx_r_button->IsChecked() || rTrig >= 255)
  552
+	if (wx_r_button->IsChecked() || rTrig >= 255)
553 553
 		PadStatus->button |= PAD_TRIGGER_R;
554 554
 	else
555 555
 		PadStatus->button &= ~PAD_TRIGGER_R;
556 556
 
557  
-	if(wx_l_button->IsChecked() || lTrig >= 255)
  557
+	if (wx_l_button->IsChecked() || lTrig >= 255)
558 558
 		PadStatus->button |= PAD_TRIGGER_L;
559 559
 	else
560 560
 		PadStatus->button &= ~PAD_TRIGGER_L;
@@ -568,7 +568,7 @@ void TASInputDlg::UpdateFromSliders(wxCommandEvent& event)
568 568
 	u8 *v;
569 569
 	update = 0;
570 570
 
571  
-	switch(event.GetId())
  571
+	switch (event.GetId())
572 572
 	{
573 573
 		case ID_MAIN_X_SLIDER:
574 574
 			text = wx_mainX_t;
@@ -616,12 +616,12 @@ void TASInputDlg::UpdateFromSliders(wxCommandEvent& event)
616 616
 	*v = (u8) value;
617 617
 	text->SetValue(wxString::Format(wxT("%i"), value));
618 618
 
619  
-	if(update == 1)
  619
+	if (update == 1)
620 620
 	{
621 621
 		static_bitmap_main->SetBitmap(TASInputDlg::CreateStickBitmap(xaxis, yaxis));
622 622
 	}
623 623
 
624  
-	if(update == 2)
  624
+	if (update == 2)
625 625
 	{
626 626
 		static_bitmap_c->SetBitmap(TASInputDlg::CreateStickBitmap(c_xaxis, c_yaxis));
627 627
 	}
@@ -634,7 +634,7 @@ void TASInputDlg::UpdateFromText(wxCommandEvent& event)
634 634
 	update = 0;
635 635
 	update_axis = 0;
636 636
 
637  
-	switch(event.GetId())
  637
+	switch (event.GetId())
638 638
 	{
639 639
 		case ID_MAIN_X_TEXT:
640 640
 			slider = wx_mainX_s;
@@ -684,31 +684,28 @@ void TASInputDlg::UpdateFromText(wxCommandEvent& event)
684 684
 		*v = (u8) (value > 255 ? 255 : value);
685 685
 		slider->SetValue(*v);
686 686
 
687  
-		if(update == 1)
  687
+		if (update == 1)
  688
+		{
  689
+			if (update_axis == 1)
688 690
 			{
689  
-				if(update_axis == 1)
690  
-				{
691  
-					xaxis = *v;
692  
-					static_bitmap_main->SetBitmap(TASInputDlg::CreateStickBitmap(xaxis,yaxis));
693  
-				}
694  
-
695  
-				if(update_axis == 2)
696  
-				{
697  
-					yaxis =256 - *v;
698  
-					static_bitmap_main->SetBitmap(TASInputDlg::CreateStickBitmap(xaxis,yaxis));
699  
-				}
700  
-
  691
+				xaxis = *v;
  692
+				static_bitmap_main->SetBitmap(TASInputDlg::CreateStickBitmap(xaxis,yaxis));
  693
+			}
  694
+			else if (update_axis == 2)
  695
+			{
  696
+				yaxis =256 - *v;
  697
+				static_bitmap_main->SetBitmap(TASInputDlg::CreateStickBitmap(xaxis,yaxis));
701 698
 			}
702 699
 
703  
-		if(update == 2)
  700
+		}
  701
+		else if (update == 2)
704 702
 		{
705  
-			if(update_axis == 1)
  703
+			if (update_axis == 1)
706 704
 			{
707 705
 				c_xaxis = *v;
708 706
 				static_bitmap_c->SetBitmap(TASInputDlg::CreateStickBitmap(c_xaxis,c_yaxis));
709 707
 			}
710  
-
711  
-			if(update_axis == 2)
  708
+			else if (update_axis == 2)
712 709
 			{
713 710
 				c_yaxis =256- *v;
714 711
 				static_bitmap_c->SetBitmap(TASInputDlg::CreateStickBitmap(c_xaxis,c_yaxis));
@@ -731,13 +728,13 @@ void TASInputDlg::OnCloseWindow(wxCloseEvent& event)
731 728
 bool TASInputDlg::TASHasFocus()
732 729
 {
733 730
 	//allows numbers to be used as hotkeys
734  
-	if(TextBoxHasFocus())
  731
+	if (TextBoxHasFocus())
735 732
 		return false;
736 733
 
737 734
 	if (wxWindow::FindFocus() == this)
738 735
 		return true;
739 736
 	else if (wxWindow::FindFocus() != nullptr &&
740  
-				wxWindow::FindFocus()->GetParent() == this)
  737
+	         wxWindow::FindFocus()->GetParent() == this)
741 738
 		return true;
742 739
 	else
743 740
 		return false;
@@ -745,22 +742,22 @@ bool TASInputDlg::TASHasFocus()
745 742
 
746 743
 bool TASInputDlg::TextBoxHasFocus()
747 744
 {
748  
-	if(wxWindow::FindFocus() == wx_mainX_t)
  745
+	if (wxWindow::FindFocus() == wx_mainX_t)
749 746
 		return true;
750 747
 
751  
-	if(wxWindow::FindFocus() == wx_mainY_t)
  748
+	if (wxWindow::FindFocus() == wx_mainY_t)
752 749
 		return true;
753 750
 
754  
-	if(wxWindow::FindFocus() == wx_cX_t)
  751
+	if (wxWindow::FindFocus() == wx_cX_t)
755 752
 		return true;
756 753
 
757  
-	if(wxWindow::FindFocus() == wx_cY_t)
  754
+	if (wxWindow::FindFocus() == wx_cY_t)
758 755
 		return true;
759 756
 
760  
-	if(wxWindow::FindFocus() == wx_l_t)
  757
+	if (wxWindow::FindFocus() == wx_l_t)
761 758
 		return true;
762 759
 
763  
-	if(wxWindow::FindFocus() == wx_r_t)
  760
+	if (wxWindow::FindFocus() == wx_r_t)
764 761
 		return true;
765 762
 
766 763
 	return false;
@@ -773,7 +770,7 @@ void TASInputDlg::OnMouseUpR(wxMouseEvent& event)
773 770
 	wxTextCtrl *textX, *textY;
774 771
 	int *x,*y;
775 772
 
776  
-	switch(event.GetId())
  773
+	switch (event.GetId())
777 774
 	{
778 775
 		case ID_MAIN_STICK:
779 776
 			sliderX = wx_mainX_s;
@@ -823,7 +820,7 @@ void TASInputDlg::OnMouseDownL(wxMouseEvent& event)
823 820
 	wxTextCtrl *textX, *textY;
824 821
 	int *x,*y;
825 822
 
826  
-	switch(event.GetId())
  823
+	switch (event.GetId())
827 824
 	{
828 825
 		case ID_MAIN_STICK:
829 826
 			sliderX = wx_mainX_s;
@@ -853,10 +850,10 @@ void TASInputDlg::OnMouseDownL(wxMouseEvent& event)
853 850
 	*x = ptM.x *2;
854 851
 	*y = ptM.y * 2;
855 852
 
856  
-	if(*x > 255)
  853
+	if (*x > 255)
857 854
 		*x = 255;
858 855
 
859  
-	if(*y > 255)
  856
+	if (*y > 255)
860 857
 		*y = 255;
861 858
 
862 859
 	sbitmap->SetBitmap(TASInputDlg::CreateStickBitmap(*x,*y));
@@ -871,7 +868,7 @@ void TASInputDlg::OnMouseDownL(wxMouseEvent& event)
871 868
 
872 869
 void TASInputDlg::SetTurboFalse(wxMouseEvent& event)
873 870
 {
874  
-	switch(event.GetId())
  871
+	switch (event.GetId())
875 872
 	{
876 873
 		case ID_A:
877 874
 				A_turbo = false;
@@ -932,12 +929,12 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
932 929
 {
933 930
 	wxCheckBox* placeholder;
934 931
 
935  
-	switch(event.GetId())
  932
+	switch (event.GetId())
936 933
 	{
937 934
 		case ID_A:
938 935
 			placeholder = wx_a_button;
939 936
 
940  
-			if(A_turbo)
  937
+			if (A_turbo)
941 938
 				A_turbo = false;
942 939
 			else
943 940
 				A_turbo = true;
@@ -945,7 +942,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
945 942
 
946 943
 		case ID_B:
947 944
 			placeholder = wx_b_button;
948  
-			if(B_turbo)
  945
+			if (B_turbo)
949 946
 				B_turbo = false;
950 947
 			else
951 948
 				B_turbo = true;
@@ -953,7 +950,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
953 950
 
954 951
 		case ID_X:
955 952
 			placeholder = wx_x_button;
956  
-			if(X_turbo)
  953
+			if (X_turbo)
957 954
 				X_turbo = false;
958 955
 			else
959 956
 				X_turbo = true;
@@ -961,7 +958,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
961 958
 
962 959
 		case ID_Y:
963 960
 			placeholder = wx_y_button;
964  
-			if(Y_turbo)
  961
+			if (Y_turbo)
965 962
 				Y_turbo = false;
966 963
 			else
967 964
 				Y_turbo = true;
@@ -969,7 +966,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
969 966
 
970 967
 		case ID_Z:
971 968
 			placeholder = wx_z_button;
972  
-			if(Z_turbo)
  969
+			if (Z_turbo)
973 970
 				Z_turbo = false;
974 971
 			else
975 972
 				Z_turbo = true;
@@ -977,7 +974,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
977 974
 
978 975
 		case ID_L:
979 976
 			placeholder = wx_l_button;
980  
-			if(L_turbo)
  977
+			if (L_turbo)
981 978
 				L_turbo = false;
982 979
 			else
983 980
 				L_turbo = true;
@@ -985,7 +982,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
985 982
 
986 983
 		case ID_R:
987 984
 			placeholder = wx_r_button;
988  
-			if(R_turbo)
  985
+			if (R_turbo)
989 986
 				R_turbo = false;
990 987
 			else
991 988
 				R_turbo = true;
@@ -993,7 +990,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
993 990
 
994 991
 		case ID_START:
995 992
 			placeholder = wx_start_button;
996  
-			if(START_turbo)
  993
+			if (START_turbo)
997 994
 				START_turbo = false;
998 995
 			else
999 996
 				START_turbo = true;
@@ -1001,7 +998,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
1001 998
 
1002 999
 		case ID_UP:
1003 1000
 			placeholder = wx_up_button;
1004  
-			if(DU_turbo)
  1001
+			if (DU_turbo)
1005 1002
 				DU_turbo = false;
1006 1003
 			else
1007 1004
 				DU_turbo = true;
@@ -1009,7 +1006,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
1009 1006
 
1010 1007
 		case ID_DOWN:
1011 1008
 			placeholder = wx_down_button;
1012  
-			if(DD_turbo)
  1009
+			if (DD_turbo)
1013 1010
 				DD_turbo = false;
1014 1011
 			else
1015 1012
 				DD_turbo = true;
@@ -1017,7 +1014,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
1017 1014
 
1018 1015
 		case ID_LEFT:
1019 1016
 			placeholder = wx_left_button;
1020  
-			if(DL_turbo)
  1017
+			if (DL_turbo)
1021 1018
 				DL_turbo = false;
1022 1019
 			else
1023 1020
 				DL_turbo = true;
@@ -1025,7 +1022,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
1025 1022
 
1026 1023
 		case ID_RIGHT:
1027 1024
 			placeholder = wx_right_button;
1028  
-			if(DR_turbo)
  1025
+			if (DR_turbo)
1029 1026
 				DR_turbo = false;
1030 1027
 			else
1031 1028
 				DR_turbo = true;
@@ -1038,97 +1035,97 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
1038 1035
 
1039 1036
 void TASInputDlg::ButtonTurbo()
1040 1037
 {
1041  
-	if(A_turbo)
  1038
+	if (A_turbo)
1042 1039
 	{
1043  
-		if(wx_a_button->GetValue())
  1040
+		if (wx_a_button->GetValue())
1044 1041
 			wx_a_button->SetValue(false);
1045 1042
 		else
1046 1043
 			wx_a_button->SetValue(true);
1047 1044
 	}
1048 1045
 
1049  
-	if(B_turbo)
  1046
+	if (B_turbo)
1050 1047
 	{
1051  
-		if(wx_b_button->GetValue())
  1048
+		if (wx_b_button->GetValue())
1052 1049
 			wx_b_button->SetValue(false);
1053 1050
 		else
1054 1051
 			wx_b_button->SetValue(true);
1055 1052
 	}
1056 1053
 
1057  
-	if(X_turbo)
  1054
+	if (X_turbo)
1058 1055
 	{
1059  
-		if(wx_x_button->GetValue())
  1056
+		if (wx_x_button->GetValue())
1060 1057
 			wx_x_button->SetValue(false);
1061 1058
 		else
1062 1059
 			wx_x_button->SetValue(true);
1063 1060
 	}
1064 1061
 
1065  
-	if(Y_turbo)
  1062
+	if (Y_turbo)
1066 1063
 	{
1067  
-		if(wx_y_button->GetValue())
  1064
+		if (wx_y_button->GetValue())
1068 1065
 			wx_y_button->SetValue(false);
1069 1066
 		else
1070 1067
 			wx_y_button->SetValue(true);
1071 1068
 	}
1072 1069
 
1073  
-	if(Z_turbo)
  1070
+	if (Z_turbo)
1074 1071
 	{
1075  
-		if(wx_z_button->GetValue())
  1072
+		if (wx_z_button->GetValue())
1076 1073
 			wx_z_button->SetValue(false);
1077 1074
 		else
1078 1075
 			wx_z_button->SetValue(true);
1079 1076
 	}
1080 1077
 
1081  
-	if(L_turbo)
  1078
+	if (L_turbo)
1082 1079
 	{
1083  
-		if(wx_l_button->GetValue())
  1080
+		if (wx_l_button->GetValue())
1084 1081
 			wx_l_button->SetValue(false);
1085 1082
 		else
1086 1083
 			wx_l_button->SetValue(true);
1087 1084
 	}
1088 1085
 
1089  
-	if(R_turbo)
  1086
+	if (R_turbo)
1090 1087
 	{
1091  
-		if(wx_r_button->GetValue())
  1088
+		if (wx_r_button->GetValue())
1092 1089
 			wx_r_button->SetValue(false);
1093 1090
 		else
1094 1091
 			wx_r_button->SetValue(true);
1095 1092
 	}
1096 1093
 
1097  
-	if(START_turbo)
  1094
+	if (START_turbo)
1098 1095
 	{
1099  
-		if(wx_start_button->GetValue())
  1096
+		if (wx_start_button->GetValue())
1100 1097
 			wx_start_button->SetValue(false);
1101 1098
 		else
1102 1099
 			wx_start_button->SetValue(true);
1103 1100
 		}
1104 1101
 
1105  
-	if(DU_turbo)
  1102
+	if (DU_turbo)
1106 1103
 	{
1107  
-		if(wx_up_button->GetValue())
  1104
+		if (wx_up_button->GetValue())
1108 1105
 			wx_up_button->SetValue(false);
1109 1106
 		else
1110 1107
 			wx_up_button->SetValue(true);
1111 1108
 	}
1112 1109
 
1113  
-	if(DD_turbo)
  1110
+	if (DD_turbo)
1114 1111
 	{
1115  
-		if(wx_down_button->GetValue())
  1112
+		if (wx_down_button->GetValue())
1116 1113
 			wx_down_button->SetValue(false);
1117 1114
 		else
1118 1115
 			wx_down_button->SetValue(true);
1119 1116
 	}
1120 1117
 
1121  
-	if(DL_turbo)
  1118
+	if (DL_turbo)
1122 1119
 	{
1123  
-		if(wx_left_button->GetValue())
  1120
+		if (wx_left_button->GetValue())
1124 1121
 			wx_left_button->SetValue(false);
1125 1122
 		else
1126 1123
 			wx_left_button->SetValue(true);
1127 1124
 	}
1128 1125
 
1129  
-	if(DR_turbo)
  1126
+	if (DR_turbo)
1130 1127
 	{
1131  
-		if(wx_right_button->GetValue())
  1128
+		if (wx_right_button->GetValue())
1132 1129
 			wx_right_button->SetValue(false);
1133 1130
 		else
1134 1131
 			wx_right_button->SetValue(true);
2  Source/Core/DolphinWX/WiimoteConfigDiag.cpp
@@ -246,7 +246,7 @@ void WiimoteConfigDiag::SelectSource(wxCommandEvent& event)
246 246
 	// Revert if the dialog is canceled.
247 247
 	int index = m_wiimote_index_from_ctrl_id[event.GetId()];
248 248
 
249  
-	if(index != WIIMOTE_BALANCE_BOARD)
  249
+	if (index != WIIMOTE_BALANCE_BOARD)
250 250
 	{
251 251
 		WiimoteReal::ChangeWiimoteSource(index, event.GetInt());
252 252
 		if (g_wiimote_sources[index] != WIIMOTE_SRC_EMU && g_wiimote_sources[index] != WIIMOTE_SRC_HYBRID)
9  Source/Core/DolphinWX/X11Utils.cpp
@@ -57,8 +57,9 @@ void SendMotionEvent(Display *dpy, int x, int y)
57 57
 
58 58
 void EWMH_Fullscreen(Display *dpy, int action)
59 59
 {
60  
-	_assert_(action == _NET_WM_STATE_REMOVE || action == _NET_WM_STATE_ADD
61  
-			|| action == _NET_WM_STATE_TOGGLE);
  60
+	_assert_(action == _NET_WM_STATE_REMOVE ||
  61
+	         action == _NET_WM_STATE_ADD ||
  62
+	         action == _NET_WM_STATE_TOGGLE);
62 63
 
63 64
 	Window win = (Window)Core::GetWindowHandle();
64 65
 
@@ -73,7 +74,7 @@ void EWMH_Fullscreen(Display *dpy, int action)
73 74
 
74 75
 	// Send the event
75 76
 	if (!XSendEvent(dpy, DefaultRootWindow(dpy), False,
76  
-				SubstructureRedirectMask | SubstructureNotifyMask, &event))
  77
+	                SubstructureRedirectMask | SubstructureNotifyMask, &event))
77 78
 		ERROR_LOG(VIDEO, "Failed to switch fullscreen/windowed mode.");
78 79
 }
79 80
 
@@ -156,7 +157,7 @@ void InhibitScreensaver(Display *dpy, Window win, bool suspend)
156 157
 
157 158
 void XRRConfiguration::Update()
158 159
 {
159  
-	if(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution == "Auto")
  160
+	if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution == "Auto")
160 161
 		return;
161 162
 
162 163
 	if (!bValid)
14  Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
@@ -24,7 +24,7 @@
24 24
 void GetXInputGUIDS( std::vector<DWORD>& guids )
25 25
 {
26 26
 
27  
-#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=nullptr; } }
  27
+#define SAFE_RELEASE(p) { if (p) { (p)->Release(); (p)=nullptr; } }
28 28
 
29 29
 	IWbemLocator*           pIWbemLocator  = nullptr;
30 30
 	IEnumWbemClassObject*   pEnumDevices   = nullptr;
@@ -50,9 +50,9 @@ void GetXInputGUIDS( std::vector<DWORD>& guids )
50 50
 	if (FAILED(hr) || pIWbemLocator == nullptr)
51 51
 		goto LCleanup;
52 52
 
53  
-	bstrNamespace = SysAllocString(L"\\\\.\\root\\cimv2");if(bstrNamespace == nullptr) goto LCleanup;
54  
-	bstrClassName = SysAllocString(L"Win32_PNPEntity");   if(bstrClassName == nullptr) goto LCleanup;
55  
-	bstrDeviceID  = SysAllocString(L"DeviceID");          if(bstrDeviceID == nullptr)  goto LCleanup;
  53
+	bstrNamespace = SysAllocString(L"\\\\.\\root\\cimv2"); if (bstrNamespace == nullptr) goto LCleanup;
  54
+	bstrClassName = SysAllocString(L"Win32_PNPEntity");    if (bstrClassName == nullptr) goto LCleanup;
  55
+	bstrDeviceID  = SysAllocString(L"DeviceID");           if (bstrDeviceID == nullptr)  goto LCleanup;
56 56
 
57 57
 	// Connect to WMI
58 58
 	hr = pIWbemLocator->ConnectServer(bstrNamespace, nullptr, nullptr, 0L, 0L, nullptr, nullptr, &pIWbemServices);
@@ -105,11 +105,11 @@ void GetXInputGUIDS( std::vector<DWORD>& guids )
105 105
 	}
106 106
 
107 107
 LCleanup:
108  
-	if(bstrNamespace)
  108
+	if (bstrNamespace)
109 109
 		SysFreeString(bstrNamespace);
110  
-	if(bstrDeviceID)
  110
+	if (bstrDeviceID)
111 111
 		SysFreeString(bstrDeviceID);
112  
-	if(bstrClassName)
  112
+	if (bstrClassName)
113 113
 		SysFreeString(bstrClassName);
114 114
 	for (UINT iDevice = 0; iDevice < 20; iDevice++)
115 115
 		SAFE_RELEASE(pDevices[iDevice]);
4  Source/Core/InputCommon/ControllerInterface/ForceFeedback/OSX/DirectInputAdapter.h
@@ -164,7 +164,7 @@ class FFDeviceAdapter : public IUnknownImpl
164 164
 		FFDeviceObjectReference ref;
165 165
 
166 166
 		HRESULT hr = FFCreateDevice(hidDevice, &ref);
167  
-		if(SUCCEEDED(hr))
  167
+		if (SUCCEEDED(hr))
168 168
 			*pDeviceReference = new FFDeviceAdapter(ref);
169 169
 
170 170
 		return hr;
@@ -175,7 +175,7 @@ class FFDeviceAdapter : public IUnknownImpl
175 175
 		FFEffectObjectReference ref;
176 176
 
177 177
 		HRESULT hr = FFDeviceCreateEffect(m_device, uuidRef, pEffectDefinition, &ref);
178  
-		if(SUCCEEDED(hr))
  178
+		if (SUCCEEDED(hr))
179 179
 			*pEffectReference = new FFEffectAdapter(m_device, ref);
180 180
 
181 181
 		return hr;
13  Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
@@ -36,7 +36,7 @@ void Init( std::vector<Core::Device*>& devices )
36 36
 	if (SDL_Init( SDL_INIT_FLAGS ) >= 0)
37 37
 	{
38 38
 		// joysticks
39  
-		for(int i = 0; i < SDL_NumJoysticks(); ++i)
  39
+		for (int i = 0; i < SDL_NumJoysticks(); ++i)
40 40
 		{
41 41
 			SDL_Joystick* dev = SDL_JoystickOpen(i);
42 42
 			if (dev)
@@ -67,12 +67,11 @@ void Init( std::vector<Core::Device*>& devices )
67 67
 	std::string lcasename = GetName();
68 68
 	std::transform(lcasename.begin(), lcasename.end(), lcasename.begin(), tolower);
69 69
 
70  
-	if ((std::string::npos != lcasename.find("xbox 360"))
71  
-		&& (10 == SDL_JoystickNumButtons(joystick))
72  
-		&& (5 == SDL_JoystickNumAxes(joystick))
73  
-		&& (1 == SDL_JoystickNumHats(joystick))
74  
-		&& (0 == SDL_JoystickNumBalls(joystick))
75  
-		)
  70
+	if ((std::string::npos != lcasename.find("xbox 360")) &&
  71
+	    (10 == SDL_JoystickNumButtons(joystick)) &&
  72
+	    (5 == SDL_JoystickNumAxes(joystick)) &&
  73
+	    (1 == SDL_JoystickNumHats(joystick)) &&
  74
+	    (0 == SDL_JoystickNumBalls(joystick)))
76 75
 	{
77 76
 		// this device won't be used
78 77
 		return;
2  Source/Core/InputCommon/UDPWiimote.cpp
@@ -115,7 +115,7 @@ struct UDPWiimote::_d
115 115
 	}
116 116
 
117 117
 	// loop through all the results and bind to everything we can
118  
-	for(p = servinfo; p != nullptr; p = p->ai_next)
  118
+	for (p = servinfo; p != nullptr; p = p->ai_next)
119 119
 	{
120 120
 		sock_t sock;
121 121
 		if ((sock = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == BAD_SOCK)
16  Source/Core/VideoBackends/D3D/D3DBase.cpp
@@ -126,7 +126,7 @@ void UnloadDXGI()
126 126
 	if (!dxgi_dll_ref) return;
127 127
 	if (--dxgi_dll_ref != 0) return;
128 128
 
129  
-	if(hDXGIDll) FreeLibrary(hDXGIDll);
  129
+	if (hDXGIDll) FreeLibrary(hDXGIDll);
130 130
 	hDXGIDll = nullptr;
131 131
 	PCreateDXGIFactory = nullptr;
132 132
 }
@@ -136,7 +136,7 @@ void UnloadD3D()
136 136
 	if (!d3d_dll_ref) return;
137 137
 	if (--d3d_dll_ref != 0) return;
138 138
 
139  
-	if(hD3DDll) FreeLibrary(hD3DDll);
  139
+	if (hD3DDll) FreeLibrary(hD3DDll);
140 140
 	hD3DDll = nullptr;
141 141
 	PD3D11CreateDevice = nullptr;
142 142
 	PD3D11CreateDeviceAndSwapChain = nullptr;
@@ -365,22 +365,22 @@ void Close()
365 365
 
366 366
 const char* VertexShaderVersionString()
367 367
 {
368  
-	if(featlevel == D3D_FEATURE_LEVEL_11_0) return "vs_5_0";
369  
-	else if(featlevel == D3D_FEATURE_LEVEL_10_1) return "vs_4_1";
  368
+	if (featlevel == D3D_FEATURE_LEVEL_11_0) return "vs_5_0";
  369
+	else if (featlevel == D3D_FEATURE_LEVEL_10_1) return "vs_4_1";
370 370
 	else /*if(featlevel == D3D_FEATURE_LEVEL_10_0)*/ return "vs_4_0";
371 371
 }
372 372
 
373 373
 const char* GeometryShaderVersionString()
374 374
 {
375  
-	if(featlevel == D3D_FEATURE_LEVEL_11_0) return "gs_5_0";
376  
-	else if(featlevel == D3D_FEATURE_LEVEL_10_1) return "gs_4_1";
  375
+	if (featlevel == D3D_FEATURE_LEVEL_11_0) return "gs_5_0";
  376
+	else if (featlevel == D3D_FEATURE_LEVEL_10_1) return "gs_4_1";
377 377
 	else /*if(featlevel == D3D_FEATURE_LEVEL_10_0)*/ return "gs_4_0";
378 378
 }
379 379
 
380 380
 const char* PixelShaderVersionString()
381 381
 {
382  
-	if(featlevel == D3D_FEATURE_LEVEL_11_0) return "ps_5_0";
383  
-	else if(featlevel == D3D_FEATURE_LEVEL_10_1) return "ps_4_1";
  382
+	if (featlevel == D3D_FEATURE_LEVEL_11_0) return "ps_5_0";
  383
+	else if (featlevel == D3D_FEATURE_LEVEL_10_1) return "ps_4_1";
384 384
 	else /*if(featlevel == D3D_FEATURE_LEVEL_10_0)*/ return "ps_4_0";
385 385
 }
386 386
 
12  Source/Core/VideoBackends/D3D/D3DUtil.cpp
@@ -35,13 +35,13 @@ class UtilVertexBuffer
35 35
 	int AppendData(void* data, int size, int vertex_size)
36 36
 	{
37 37
 		D3D11_MAPPED_SUBRESOURCE map;
38  
-		if(offset + size >= max_size)
  38
+		if (offset + size >= max_size)
39 39
 		{
40 40
 			// wrap buffer around and notify observers
41 41
 			offset = 0;
42 42
 			context->Map(buf, 0, D3D11_MAP_WRITE_DISCARD, 0, &map);
43 43
 
44  
-			for(bool* observer : observers)
  44
+			for (bool* observer : observers)
45 45
 				*observer = true;
46 46
 		}
47 47
 		else
@@ -623,10 +623,10 @@ void drawColorQuad(u32 Color, float x1, float y1, float x2, float y2)
623 623
 		{ x2, y1, 0.f, Color },
624 624
 	};
625 625
 
626  
-	if(cq_observer ||
627  
-		draw_quad_data.x1 != x1 || draw_quad_data.y1 != y1 ||
628  
-		draw_quad_data.x2 != x2 || draw_quad_data.y2 != y2 ||
629  
-		draw_quad_data.col != Color)
  626
+	if (cq_observer ||
  627
+	    draw_quad_data.x1 != x1 || draw_quad_data.y1 != y1 ||
  628
+	    draw_quad_data.x2 != x2 || draw_quad_data.y2 != y2 ||
  629
+	    draw_quad_data.col != Color)
630 630
 	{
631 631
 		cq_offset = util_vbuf->AppendData(coords, sizeof(coords), sizeof(ColVertex));
632 632
 		cq_observer = false;
4  Source/Core/VideoBackends/D3D/GfxState.cpp
@@ -29,7 +29,7 @@
29 29
 
30 30
 template<typename T> AutoState<T>::~AutoState()
31 31
 {
32  
-	if(state) ((T*)state)->Release();
  32
+	if (state) ((T*)state)->Release();
33 33
 	state = nullptr;
34 34
 }
35 35
 
@@ -77,4 +77,4 @@ void StateManager::Apply()
77 77
 
78 78
 }  // namespace
79 79
 
80  
-}  // namespace DX11
  80
+}  // namespace DX11
4  Source/Core/VideoBackends/D3D/PixelShaderCache.cpp
@@ -174,7 +174,7 @@
174 174
 	"	int width, height, samples;\n"
175 175
 	"	Tex0.GetDimensions(width, height, samples);\n"
176 176
 	"	float4 texcol = 0;\n"
177  
-	"	for(int i = 0; i < samples; ++i)\n"
  177
+	"	for (int i = 0; i < samples; ++i)\n"
178 178
 	"		texcol += Tex0.Load(int2(uv0.x*(width), uv0.y*(height)), i);\n"
179 179
 	"	texcol /= samples;\n"
180 180
 	"	int4 src6 = round(texcol * 63.f);\n"
@@ -216,7 +216,7 @@
216 216
 	"	int width, height, samples;\n"
217 217
 	"	Tex0.GetDimensions(width, height, samples);\n"
218 218
 	"	float4 texcol = 0;\n"
219  
-	"	for(int i = 0; i < samples; ++i)\n"
  219
+	"	for (int i = 0; i < samples; ++i)\n"
220 220
 	"		texcol += Tex0.Load(int2(uv0.x*(width), uv0.y*(height)), i);\n"
221 221
 	"	texcol /= samples;\n"
222 222
 	"	int4 src8 = round(texcol * 255.f);\n"
18  Source/Core/VideoBackends/D3D/Render.cpp
@@ -233,7 +233,7 @@ void CreateScreenshotTexture(const TargetRectangle& rc)
233 233
 											0.f, 1 << g_ActiveConfig.iMaxAnisotropy,
234 234
 											D3D11_COMPARISON_ALWAYS, border,
235 235
 											-D3D11_FLOAT32_MAX, D3D11_FLOAT32_MAX);
236  
-		if(g_ActiveConfig.iMaxAnisotropy != 0) gx_state.sampdc[k].Filter = D3D11_FILTER_ANISOTROPIC;
  236
+		if (g_ActiveConfig.iMaxAnisotropy != 0) gx_state.sampdc[k].Filter = D3D11_FILTER_ANISOTROPIC;
237 237
 	}
238 238
 
239 239
 	// Clear EFB textures
@@ -362,7 +362,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
362 362
 
363 363
 	// Take the mean of the resulting dimensions; TODO: Don't use the center pixel, compute the average color instead
364 364
 	D3D11_RECT RectToLock;
365  
-	if(type == PEEK_COLOR || type == PEEK_Z)
  365
+	if (type == PEEK_COLOR || type == PEEK_Z)
366 366
 	{
367 367
 		RectToLock.left = (targetPixelRc.left + targetPixelRc.right) / 2;
368 368
 		RectToLock.top = (targetPixelRc.top + targetPixelRc.bottom) / 2;
@@ -409,7 +409,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
409 409
 
410 410
 		float val = *(float*)map.pData;
411 411
 		u32 ret = 0;
412  
-		if(bpmem.zcontrol.pixel_format == PIXELFMT_RGB565_Z16)
  412
+		if (bpmem.zcontrol.pixel_format == PIXELFMT_RGB565_Z16)
413 413
 		{
414 414
 			// if Z is in 16 bit format you must return a 16 bit integer
415 415
 			ret = ((u32)(val * 0xffff));
@@ -433,7 +433,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
433 433
 		// read the data from system memory
434 434
 		D3D::context->Map(read_tex, 0, D3D11_MAP_READ, 0, &map);
435 435
 		u32 ret = 0;
436  
-		if(map.pData)
  436
+		if (map.pData)
437 437
 			ret = *(u32*)map.pData;
438 438
 		D3D::context->Unmap(read_tex, 0);
439 439
 
@@ -448,13 +448,13 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
448 448
 		{
449 449
 			ret = RGBA8ToRGB565ToRGBA8(ret);
450 450
 		}
451  
-		if(bpmem.zcontrol.pixel_format != PIXELFMT_RGBA6_Z24)
  451
+		if (bpmem.zcontrol.pixel_format != PIXELFMT_RGBA6_Z24)
452 452
 		{
453 453
 			ret |= 0xFF000000;
454 454
 		}
455 455
 
456  
-		if(alpha_read_mode.ReadMode == 2) return ret; // GX_READ_NONE
457  
-		else if(alpha_read_mode.ReadMode == 1) return (ret | 0xFF000000); // GX_READ_FF
  456
+		if (alpha_read_mode.ReadMode == 2) return ret; // GX_READ_NONE
  457
+		else if (alpha_read_mode.ReadMode == 1) return (ret | 0xFF000000); // GX_READ_FF
458 458
 		else /*if(alpha_read_mode.ReadMode == 0)*/ return (ret & 0x00FFFFFF); // GX_READ_00
459 459
 	}
460 460
 	else //if(type == POKE_COLOR)
@@ -784,7 +784,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl
784 784
 		s_television.Submit(xfbAddr, fbWidth, fbHeight);
785 785
 		s_television.Render();
786 786
 	}
787  
-	else if(g_ActiveConfig.bUseXFB)
  787
+	else if (g_ActiveConfig.bUseXFB)
788 788
 	{
789 789
 		const XFBSourceBase* xfbSource;
790 790
 
@@ -1084,7 +1084,7 @@ void Renderer::ApplyState(bool bUseDstAlpha)
1084 1084
 		// TODO: unnecessary state changes, we should store a list of shader resources
1085 1085
 		//if (shader_resources[stage])
1086 1086
 		{
1087  
-			if(g_ActiveConfig.iMaxAnisotropy > 0) gx_state.sampdc[stage].Filter = D3D11_FILTER_ANISOTROPIC;
  1087
+			if (g_ActiveConfig.iMaxAnisotropy > 0) gx_state.sampdc[stage].Filter = D3D11_FILTER_ANISOTROPIC;
1088 1088
 			hr = D3D::device->CreateSamplerState(&gx_state.sampdc[stage], &samplerstate[stage]);
1089 1089
 			if (FAILED(hr)) PanicAlert("Fail %s %d, stage=%d\n", __FILE__, __LINE__, stage);
1090 1090
 			else D3D::SetDebugObjectName((ID3D11DeviceChild*)samplerstate[stage], "sampler state used to emulate the GX pipeline");
2  Source/Core/VideoBackends/OGL/FramebufferManager.cpp
@@ -353,7 +353,7 @@ void FramebufferManager::ReinterpretPixelData(unsigned int convtype)
353 353
 
354 354
 	GLuint src_texture = 0;
355 355
 
356  
-	if(m_msaaSamples > 1)
  356
+	if (m_msaaSamples > 1)
357 357
 	{
358 358
 		// MSAA mode, so resolve first
359 359
 		glBindFramebuffer(GL_READ_FRAMEBUFFER, m_efbFramebuffer);
12  Source/Core/VideoBackends/OGL/GLUtil.cpp
@@ -64,9 +64,9 @@ GLuint OpenGL_CompileProgram ( const char* vertexShader, const char* fragmentSha
64 64
 	GLsizei stringBufferUsage = 0;
65 65
 	glGetShaderiv(vertexShaderID, GL_COMPILE_STATUS, &Result);
66 66
 	glGetShaderInfoLog(vertexShaderID, 1024, &stringBufferUsage, stringBuffer);
67  
-	if(Result && stringBufferUsage) {
  67
+	if (Result && stringBufferUsage) {
68 68
 		ERROR_LOG(VIDEO, "GLSL vertex shader warnings:\n%s%s", stringBuffer, vertexShader);
69  
-	} else if(!Result) {
  69
+	} else if (!Result) {
70 70
 		ERROR_LOG(VIDEO, "GLSL vertex shader error:\n%s%s", stringBuffer, vertexShader);
71 71
 	} else {
72 72
 		DEBUG_LOG(VIDEO, "GLSL vertex shader compiled:\n%s", vertexShader);
@@ -80,9 +80,9 @@ GLuint OpenGL_CompileProgram ( const char* vertexShader, const char* fragmentSha
80 80
 #if defined(_DEBUG) || defined(DEBUGFAST) || defined(DEBUG_GLSL)
81 81
 	glGetShaderiv(fragmentShaderID, GL_COMPILE_STATUS, &Result);
82 82
 	glGetShaderInfoLog(fragmentShaderID, 1024, &stringBufferUsage, stringBuffer);
83  
-	if(Result && stringBufferUsage) {
  83
+	if (Result && stringBufferUsage) {
84 84
 		ERROR_LOG(VIDEO, "GLSL fragment shader warnings:\n%s%s", stringBuffer, fragmentShader);
85  
-	} else if(!Result) {
  85
+	} else if (!Result) {
86 86
 		ERROR_LOG(VIDEO, "GLSL fragment shader error:\n%s%s", stringBuffer, fragmentShader);
87 87
 	} else {
88 88
 		DEBUG_LOG(VIDEO, "GLSL fragment shader compiled:\n%s", fragmentShader);
@@ -97,9 +97,9 @@ GLuint OpenGL_CompileProgram ( const char* vertexShader, const char* fragmentSha
97 97
 #if defined(_DEBUG) || defined(DEBUGFAST) || defined(DEBUG_GLSL)
98 98
 	glGetProgramiv(programID, GL_LINK_STATUS, &Result);
99 99
 	glGetProgramInfoLog(programID, 1024, &stringBufferUsage, stringBuffer);
100  
-	if(Result && stringBufferUsage) {
  100
+	if (Result && stringBufferUsage) {
101 101
 		ERROR_LOG(VIDEO, "GLSL linker warnings:\n%s%s%s", stringBuffer, vertexShader, fragmentShader);
102  
-	} else if(!Result && !shader_errors) {
  102
+	} else if (!Result && !shader_errors) {
103 103
 		ERROR_LOG(VIDEO, "GLSL linker error:\n%s%s%s", stringBuffer, vertexShader, fragmentShader);
104 104
 	}
105 105
 #endif
6  Source/Core/VideoBackends/OGL/PostProcessing.cpp
@@ -77,7 +77,7 @@ void BindTargetFramebuffer ()
77 77
 
78 78
 void BlitToScreen()
79 79
 {
80  
-	if(!s_enable) return;
  80
+	if (!s_enable) return;
81 81
 
82 82
 	glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
83 83
 	glViewport(0, 0, s_width, s_height);
@@ -101,7 +101,7 @@ void Update ( u32 width, u32 height )
101 101
 {
102 102
 	ApplyShader();
103 103
 
104  
-	if(s_enable && (width != s_width || height != s_height)) {
  104
+	if (s_enable && (width != s_width || height != s_height)) {
105 105
 		s_width = width;
106 106
 		s_height = height;
107 107
 
@@ -133,7 +133,7 @@ void ApplyShader()
133 133
 		// Fallback to shared user dir
134 134
 		path = File::GetSysDirectory() + SHADERS_DIR DIR_SEP + g_ActiveConfig.sPostProcessingShader + ".glsl";
135 135
 	}
136  
-	if(!File::ReadFileToString(path.c_str(), code)) {
  136
+	if (!File::ReadFileToString(path.c_str(), code)) {
137 137
 		ERROR_LOG(VIDEO, "Post-processing shader not found: %s", path.c_str());
138 138
 		return;
139 139
 	}
22  Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
@@ -47,9 +47,9 @@ void SHADER::SetProgramVariables()
47 47
 		GLint PSBlock_id = glGetUniformBlockIndex(glprogid, "PSBlock");
48 48
 		GLint VSBlock_id = glGetUniformBlockIndex(glprogid, "VSBlock");
49 49
 
50  
-		if(PSBlock_id != -1)
  50
+		if (PSBlock_id != -1)
51 51
 			glUniformBlockBinding(glprogid, PSBlock_id, 1);
52  
-		if(VSBlock_id != -1)
  52
+		if (VSBlock_id != -1)
53 53
 			glUniformBlockBinding(glprogid, VSBlock_id, 2);
54 54
 	}
55 55
 
@@ -89,7 +89,7 @@ void SHADER::SetProgramBindings()
89 89
 	glBindAttribLocation(glprogid, SHADER_NORM1_ATTRIB,    "rawnorm1");
90 90
 	glBindAttribLocation(glprogid, SHADER_NORM2_ATTRIB,    "rawnorm2");
91 91
 
92  
-	for(int i=0; i<8; i++) {
  92
+	for (int i=0; i<8; i++) {
93 93
 		char attrib_name[8];
94 94
 		snprintf(attrib_name, 8, "tex%d", i);
95 95
 		glBindAttribLocation(glprogid, SHADER_TEXTURE0_ATTRIB+i, attrib_name);
@@ -98,7 +98,7 @@ void SHADER::SetProgramBindings()
98 98
 
99 99
 void SHADER::Bind()
100 100
 {
101  
-	if(CurrentProgram != glprogid)
  101
+	if (CurrentProgram != glprogid)
102 102
 	{
103 103
 		glUseProgram(glprogid);
104 104
 		CurrentProgram = glprogid;
@@ -107,7 +107,7 @@ void SHADER::Bind()
107 107
 
108 108
 void ProgramShaderCache::UploadConstants()
109 109
 {
110  
-	if(PixelShaderManager::dirty || VertexShaderManager::dirty)
  110
+	if (PixelShaderManager::dirty || VertexShaderManager::dirty)
111 111
 	{
112 112
 		auto buffer = s_buffer->Map(s_ubo_buffer_size, s_ubo_align);
113 113
 
@@ -210,7 +210,7 @@ bool ProgramShaderCache::CompileShader ( SHADER& shader, const char* vcode, cons
210 210
 	GLuint vsid = CompileSingleShader(GL_VERTEX_SHADER, vcode);
211 211
 	GLuint psid = CompileSingleShader(GL_FRAGMENT_SHADER, pcode);
212 212
 
213  
-	if(!vsid || !psid)
  213
+	if (!vsid || !psid)
214 214
 	{
215 215
 		glDeleteShader(vsid);
216 216
 		glDeleteShader(psid);
@@ -250,7 +250,7 @@ bool ProgramShaderCache::CompileShader ( SHADER& shader, const char* vcode, cons
250 250
 		file << s_glsl_header << vcode << s_glsl_header << pcode << infoLog;
251 251
 		file.close();
252 252
 
253  
-		if(linkStatus != GL_TRUE)
  253
+		if (linkStatus != GL_TRUE)
254 254
 			PanicAlert("Failed to link shaders!\nThis usually happens when trying to use Dolphin with an outdated GPU or integrated GPU like the Intel GMA series.\n\nIf you're sure this is Dolphin's error anyway, post the contents of %s along with this error message at the forums.\n\nDebug info (%s, %s, %s):\n%s",
255 255
 				szTemp,
256 256
 				g_ogl_config.gl_vendor,
@@ -308,7 +308,7 @@ GLuint ProgramShaderCache::CompileSingleShader (GLuint type, const char* code )
308 308
 		file << s_glsl_header << code << infoLog;
309 309
 		file.close();
310 310
 
311  
-		if(compileStatus != GL_TRUE)
  311
+		if (compileStatus != GL_TRUE)
312 312
 			PanicAlert("Failed to compile %s shader!\nThis usually happens when trying to use Dolphin with an outdated GPU or integrated GPU like the Intel GMA series.\n\nIf you're sure this is Dolphin's error anyway, post the contents of %s along with this error message at the forums.\n\nDebug info (%s, %s, %s):\n%s",
313 313
 				type==GL_VERTEX_SHADER ? "vertex" : "pixel",
314 314
 				szTemp,
@@ -373,7 +373,7 @@ void ProgramShaderCache::Init(void)
373 373
 	{
374 374
 		GLint Supported;
375 375
 		glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &Supported);
376  
-		if(!Supported)
  376
+		if (!Supported)
377 377
 		{
378 378
 			ERROR_LOG(VIDEO, "GL_ARB_get_program_binary is supported, but no binary format is known. So disable shader cache.");
379 379
 			g_ogl_config.bSupportsGLSLCache = false;
@@ -406,14 +406,14 @@ void ProgramShaderCache::Shutdown(void)
406 406
 	{
407 407
 		for (auto& entry : pshaders)
408 408
 		{
409  
-			if(entry.second.in_cache)
  409
+			if (entry.second.in_cache)
410 410
 			{
411 411
 				continue;
412 412
 			}
413 413
 
414 414
 			GLint binary_size;
415 415
 			glGetProgramiv(entry.second.shader.glprogid, GL_PROGRAM_BINARY_LENGTH, &binary_size);
416  
-			if(!binary_size)
  416
+			if (!binary_size)
417 417
 			{
418 418
 				continue;
419 419
 			}
6  Source/Core/VideoBackends/OGL/ProgramShaderCache.h
@@ -25,9 +25,9 @@ class SHADERUID
25 25
 
26 26
 	bool operator <(const SHADERUID& r) const
27 27
 	{
28  
-		if(puid < r.puid) return true;
29  
-		if(r.puid < puid) return false;
30  
-		if(vuid < r.vuid) return true;
  28
+		if (puid < r.puid) return true;
  29
+		if (r.puid < puid) return false;
  30
+		if (vuid < r.vuid) return true;
31 31
 		return false;
32 32
 	}
33 33
 
18  Source/Core/VideoBackends/OGL/RasterFont.cpp
@@ -141,9 +141,9 @@
141 141
 	glActiveTexture(GL_TEXTURE0+8);
142 142
 	glBindTexture(GL_TEXTURE_2D, texture);
143 143
 	u32* texture_data = new u32[char_width*char_count*char_height];
144  
-	for(u32 y=0; y<char_height; y++) {
145  
-		for(u32 c=0; c<char_count; c++) {
146  
-			for(u32 x=0; x<char_width; x++) {
  144
+	for (u32 y=0; y<char_height; y++) {
  145
+		for (u32 c=0; c<char_count; c++) {
  146
+			for (u32 x=0; x<char_width; x++) {
147 147
 				bool pixel = (0 != (rasters[c][y] & (1<<(char_width-x-1))));
148 148
 				texture_data[char_width*char_count*y+char_width*c+x] = pixel ? -1 : 0;
149 149
 			}
@@ -195,22 +195,22 @@ void RasterFont::printMultilineText(const char *text, double start_x, double sta
195 195
 	GLfloat x = GLfloat(start_x);
196 196
 	GLfloat y = GLfloat(start_y);
197 197
 
198  
-	for(size_t i=0; i<length; i++) {
  198
+	for (size_t i=0; i<length; i++) {
199 199
 		u8 c = text[i];
200 200
 
201  
-		if(c == '\n') {
  201
+		if (c == '\n') {
202 202
 			x = GLfloat(start_x);
203 203
 			y -= delta_y + border_y;
204 204
 			continue;
205 205
 		}
206 206
 
207 207
 		// do not print spaces, they can be skipped easily
208  
-		if(c == ' ') {
  208
+		if (c == ' ') {
209 209
 			x += delta_x + border_x;
210 210
 			continue;
211 211
 		}
212 212
 
213  
-		if(c < char_offset || c >= char_count+char_offset) continue;
  213
+		if (c < char_offset || c >= char_count+char_offset) continue;
214 214
 
215 215
 		vertices[usage++] = x;
216 216
 		vertices[usage++] = y;
@@ -245,7 +245,7 @@ void RasterFont::printMultilineText(const char *text, double start_x, double sta
245 245
 		x += delta_x + border_x;
246 246
 	}
247 247
 
248  
-	if(!usage) {
  248
+	if (!usage) {
249 249
 		delete [] vertices;
250 250
 		return;
251 251
 	}
@@ -258,7 +258,7 @@ void RasterFont::printMultilineText(const char *text, double start_x, double sta
258 258
 
259 259
 	s_shader.Bind();
260 260
 
261  
-	if(color != cached_color) {
  261
+	if (color != cached_color) {
262 262
 		glUniform4f(uniform_color_id, GLfloat((color>>16)&0xff)/255.f,GLfloat((color>>8)&0xff)/255.f,GLfloat((color>>0)&0xff)/255.f,GLfloat((color>>24)&0xff)/255.f);
263 263
 		cached_color = color;
264 264
 	}
56  Source/Core/VideoBackends/OGL/Render.cpp
@@ -147,7 +147,7 @@ int GetNumMSAASamples(int MSAAMode)
147 147
 			samples = 1;
148 148
 	}
149 149
 
150  
-	if(samples <= g_ogl_config.max_samples) return samples;
  150
+	if (samples <= g_ogl_config.max_samples) return samples;
151 151
 
152 152
 	// TODO: move this to InitBackendInfo
153 153
 	OSD::AddMessage(StringFromFormat("%d Anti Aliasing samples selected, but only %d supported by your GPU.", samples, g_ogl_config.max_samples), 10000);
@@ -172,7 +172,7 @@ int GetNumMSAACoverageSamples(int MSAAMode)
172 172
 		default:
173 173
 			samples = 0;
174 174
 	}
175  
-	if(g_ogl_config.bSupportCoverageMSAA || samples == 0) return samples;
  175
+	if (g_ogl_config.bSupportCoverageMSAA || samples == 0) return samples;
176 176
 
177 177
 	// TODO: move this to InitBackendInfo
178 178
 	OSD::AddMessage("CSAA Anti Aliasing isn't supported by your GPU.", 10000);
@@ -183,15 +183,15 @@ void ApplySSAASettings() {
183 183
 	// GLES3 doesn't support SSAA
184 184
 	if (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGL)
185 185
 	{
186  
-		if(g_ActiveConfig.iMultisampleMode == MULTISAMPLE_SSAA_4X) {
187  
-			if(g_ogl_config.bSupportSampleShading) {
  186
+		if (g_ActiveConfig.iMultisampleMode == MULTISAMPLE_SSAA_4X) {
  187
+			if (g_ogl_config.bSupportSampleShading) {
188 188
 				glEnable(GL_SAMPLE_SHADING_ARB);
189 189
 				glMinSampleShadingARB(s_MSAASamples);
190 190
 			} else {
191 191
 				// TODO: move this to InitBackendInfo
192 192
 				OSD::AddMessage("SSAA Anti Aliasing isn't supported by your GPU.", 10000);
193 193
 			}
194  
-		} else if(g_ogl_config.bSupportSampleShading) {
  194
+		} else if (g_ogl_config.bSupportSampleShading) {
195 195
 			glDisable(GL_SAMPLE_SHADING_ARB);
196 196
 		}
197 197
 	}
@@ -202,7 +202,7 @@ void GLAPIENTRY ErrorCallback( GLenum source, GLenum type, GLuint id, GLenum sev
202 202
 	const char *s_source;
203 203
 	const char *s_type;
204 204
 
205  
-	switch(source)
  205
+	switch (source)
206 206
 	{
207 207
 		case GL_DEBUG_SOURCE_API_ARB:             s_source = "API"; break;
208 208
 		case GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB:   s_source = "Window System"; break;
@@ -212,7 +212,7 @@ void GLAPIENTRY ErrorCallback( GLenum source, GLenum type, GLuint id, GLenum sev
212 212
 		case GL_DEBUG_SOURCE_OTHER_ARB:           s_source = "Other"; break;
213 213
 		default:                                  s_source = "Unknown"; break;
214 214
 	}
215  
-	switch(type)
  215
+	switch (type)
216 216
 	{
217 217
 		case GL_DEBUG_TYPE_ERROR_ARB:               s_type = "Error"; break;
218 218
 		case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB: s_type = "Deprecated"; break;
@@ -222,7 +222,7 @@ void GLAPIENTRY ErrorCallback( GLenum source, GLenum type, GLuint id, GLenum sev
222 222
 		case GL_DEBUG_TYPE_OTHER_ARB:               s_type = "Other"; break;
223 223
 		default:                                    s_type = "Unknown"; break;
224 224
 	}
225  
-	switch(severity)
  225
+	switch (severity)
226 226
 	{
227 227
 		case GL_DEBUG_SEVERITY_HIGH_ARB:   ERROR_LOG(VIDEO, "id: %x, source: %s, type: %s - %s", id, s_source, s_type, message); break;
228 228
 		case GL_DEBUG_SEVERITY_MEDIUM_ARB: WARN_LOG(VIDEO, "id: %x, source: %s, type: %s - %s", id, s_source, s_type, message); break;
@@ -277,7 +277,7 @@ void InitDriverInfo()
277 277
 		vendor = DriverDetails::VENDOR_VIVANTE;
278 278
 
279 279
 	// Get device family and driver version...if we care about it
280  
-	switch(vendor)
  280
+	switch (vendor)
281 281
 	{
282 282
 		case DriverDetails::VENDOR_QUALCOMM:
283 283
 		{
@@ -292,16 +292,16 @@ void InitDriverInfo()
292 292
 		case DriverDetails::VENDOR_ARM:
293 293
 			if (std::string::npos != srenderer.find("Mali-T6"))
294 294
 				driver = DriverDetails::DRIVER_ARM_T6XX;
295  
-			else if(std::string::npos != srenderer.find("Mali-4"))
  295
+			else if (std::string::npos != srenderer.find("Mali-4"))
296 296
 				driver = DriverDetails::DRIVER_ARM_4XX;
297 297
 		break;
298 298
 		case DriverDetails::VENDOR_MESA:
299 299
 		{
300  
-			if(svendor == "nouveau")
  300
+			if (svendor == "nouveau")
301 301
 				driver = DriverDetails::DRIVER_NOUVEAU;
302  
-			else if(svendor == "Intel Open Source Technology Center")
  302
+			else if (svendor == "Intel Open Source Technology Center")
303 303
 				driver = DriverDetails::DRIVER_I965;
304  
-			else if(std::string::npos != srenderer.find("AMD") || std::string::npos != srenderer.find("ATI"))
  304
+			else if (std::string::npos != srenderer.find("AMD") || std::string::npos != srenderer.find("ATI"))
305 305
 				driver = DriverDetails::DRIVER_R600;
306 306
 
307 307
 			int major = 0;
@@ -474,19 +474,19 @@ void InitDriverInfo()
474 474
 		g_ogl_config.eSupportedGLSLVersion = GLSLES3;
475 475
 	else
476 476
 	{
477  
-		if(strstr(g_ogl_config.glsl_version, "1.00") || strstr(g_ogl_config.glsl_version, "1.10") || strstr(g_ogl_config.glsl_version, "1.20"))
  477
+		if (strstr(g_ogl_config.glsl_version, "1.00") || strstr(g_ogl_config.glsl_version, "1.10") || strstr(g_ogl_config.glsl_version, "1.20"))
478 478
 		{
479 479
 			PanicAlert("GPU: OGL ERROR: Need at least GLSL 1.30\n"
480 480
 					"GPU: Does your video card support OpenGL 3.0?\n"
481 481
 					"GPU: Your driver supports GLSL %s", g_ogl_config.glsl_version);
482 482
 			bSuccess = false;
483 483
 		}
484  
-		else if(strstr(g_ogl_config.glsl_version, "1.30"))
  484
+		else if (strstr(g_ogl_config.glsl_version, "1.30"))
485 485
 		{
486 486
 			g_ogl_config.eSupportedGLSLVersion = GLSL_130;
487 487
 			g_Config.backend_info.bSupportsEarlyZ = false; // layout keyword is only supported on glsl150+
488 488
 		}
489  
-		else if(strstr(g_ogl_config.glsl_version, "1.40"))
  489
+		else if (strstr(g_ogl_config.glsl_version, "1.40"))
490 490
 		{
491 491
 			g_ogl_config.eSupportedGLSLVersion = GLSL_140;
492 492
 			g_Config.backend_info.bSupportsEarlyZ = false; // layout keyword is only supported on glsl150+
@@ -512,7 +512,7 @@ void InitDriverInfo()
512 512
 #endif
513 513
 	int samples;
514 514
 	glGetIntegerv(GL_SAMPLES, &samples);
515  
-	if(samples > 1)
  515
+	if (samples > 1)
516 516
 	{
517 517
 		// MSAA on default framebuffer isn't working because of glBlitFramebuffer.
518 518
 		// It also isn't useful as we don't render anything to the default framebuffer.
@@ -531,7 +531,7 @@ void InitDriverInfo()
531 531
 	}
532 532
 
533 533
 	glGetIntegerv(GL_MAX_SAMPLES, &g_ogl_config.max_samples);
534  
-	if(g_ogl_config.max_samples < 1)
  534
+	if (g_ogl_config.max_samples < 1)
535 535
 		g_ogl_config.max_samples = 1;
536 536
 
537 537
 	UpdateActiveConfig();
@@ -599,12 +599,12 @@ void InitDriverInfo()
599 599
 	glBlendColor(0, 0, 0, 0.5f);
600 600
 	glClearDepthf(1.0f);
601 601
 
602  
-	if(g_ActiveConfig.backend_info.bSupportsPrimitiveRestart)
  602
+	if (g_ActiveConfig.backend_info.bSupportsPrimitiveRestart)
603 603
 	{
604 604
 		if (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGLES3)
605 605
 			glEnable(GL_PRIMITIVE_RESTART_FIXED_INDEX);
606 606
 		else
607  
-			if(g_ogl_config.bSupportOGL31)
  607
+			if (g_ogl_config.bSupportOGL31)
608 608
 			{
609 609
 				glEnable(GL_PRIMITIVE_RESTART);
610 610
 				glPrimitiveRestartIndex(65535);
@@ -988,7 +988,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
988 988
 			// Scale the 32-bit value returned by glReadPixels to a 24-bit
989 989
 			// value (GC uses a 24-bit Z-buffer).
990 990
 			// TODO: in RE0 this value is often off by one, which causes lighting to disappear
991  
-			if(bpmem.zcontrol.pixel_format == PIXELFMT_RGB565_Z16)
  991
+			if (bpmem.zcontrol.pixel_format == PIXELFMT_RGB565_Z16)
992 992
 			{
993 993
 				// if Z is in 16 bit format you must return a 16 bit integer
994 994
 				z = z >> 16;
@@ -1054,12 +1054,12 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
1054 1054
 			{
1055 1055
 				color = RGBA8ToRGB565ToRGBA8(color);
1056 1056
 			}
1057  
-			if(bpmem.zcontrol.pixel_format != PIXELFMT_RGBA6_Z24)
  1057
+			if (bpmem.zcontrol.pixel_format != PIXELFMT_RGBA6_Z24)
1058 1058
 			{
1059 1059
 				color |= 0xFF000000;
1060 1060
 			}
1061  
-			if(alpha_read_mode.ReadMode == 2) return color; // GX_READ_NONE
1062  
-			else if(alpha_read_mode.ReadMode == 1) return (color | 0xFF000000); // GX_READ_FF
  1061
+			if (alpha_read_mode.ReadMode == 2) return color; // GX_READ_NONE
  1062
+			else if (alpha_read_mode.ReadMode == 1) return (color | 0xFF000000); // GX_READ_FF
1063 1063
 			else /*if(alpha_read_mode.ReadMode == 0)*/ return (color & 0x00FFFFFF); // GX_READ_00
1064 1064
 		}
1065 1065
 
@@ -1110,7 +1110,7 @@ void Renderer::SetViewport()
1110 1110
 	}
1111 1111
 
1112 1112
 	// Update the view port
1113  
-	if(g_ogl_config.bSupportViewportFloat)
  1113
+	if (g_ogl_config.bSupportViewportFloat)
1114 1114
 	{
1115 1115
 		glViewportIndexedf(0, X, Y, Width, Height);
1116 1116
 	}
@@ -1317,7 +1317,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl
1317 1317
 
1318 1318
 	const XFBSourceBase* xfbSource = nullptr;
1319 1319
 
1320  
-	if(g_ActiveConfig.bUseXFB)
  1320
+	if (g_ActiveConfig.bUseXFB)
1321 1321
 	{
1322 1322
 		// Render to the real/postprocessing buffer now.
1323 1323
 		PostProcessing::BindTargetFramebuffer();
@@ -1583,7 +1583,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl
1583 1583
 		GL_REPORT_ERRORD();
1584 1584
 	}
1585 1585
 
1586  
-	if(s_vsync != g_ActiveConfig.IsVSync())
  1586
+	if (s_vsync != g_ActiveConfig.IsVSync())
1587 1587
 	{
1588 1588
 		s_vsync = g_ActiveConfig.IsVSync();
1589 1589
 		GLInterface->SwapInterval(s_vsync);
@@ -1767,7 +1767,7 @@ void Renderer::FlipImageData(u8 *data, int w, int h, int pixel_width)
1767 1767
 	// Flip image upside down. Damn OpenGL.
1768 1768
 	for (int y = 0; y < h / 2; ++y)
1769 1769
 	{
1770  
-		for(int x = 0; x < w; ++x)
  1770
+		for (int x = 0; x < w; ++x)
1771 1771
 		{
1772 1772
 			for (int delta = 0; delta < pixel_width; ++delta)
1773 1773
 				std::swap(data[(y * w + x) * pixel_width + delta], data[((h - 1 - y) * w + x) * pixel_width + delta]);
18  Source/Core/VideoBackends/OGL/StreamBuffer.cpp
@@ -66,7 +66,7 @@ static u32 genBuffer()
66 66
 void StreamBuffer::CreateFences()
67 67
 {
68 68
 	fences = new GLsync[SYNC_POINTS];
69  
-	for(u32 i=0; i<SYNC_POINTS; i++)
  69
+	for (u32 i=0; i<SYNC_POINTS; i++)
70 70
 		fences[i] = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
71 71
 }
72 72
 void StreamBuffer::DeleteFences()
@@ -123,7 +123,7 @@ void StreamBuffer::AllocMemory(size_t size)
123 123
 
124 124
 void StreamBuffer::Align(u32 stride)
125 125
 {
126  
-	if(m_iterator && stride) {
  126
+	if (m_iterator && stride) {
127 127
 		m_iterator--;
128 128
 		m_iterator = m_iterator - (m_iterator % stride) + stride;
129 129
 	}
@@ -149,7 +149,7 @@ class MapAndOrphan : public StreamBuffer
149 149
 
150 150
 	std::pair<u8*, size_t> Map(size_t size, u32 stride) override {
151 151
 		Align(stride);
152  
-		if(m_iterator + size >= m_size) {
  152
+		if (m_iterator + size >= m_size) {
153 153
 			glBufferData(m_buffertype, m_size, nullptr, GL_STREAM_DRAW);
154 154
 			m_iterator = 0;
155 155
 		}
@@ -350,9 +350,9 @@ class BufferData : public StreamBuffer
350 350
 StreamBuffer* StreamBuffer::Create(u32 type, size_t size)
351 351
 {
352 352
 	// without basevertex support, only streaming methods whith uploads everything to zero works fine:
353  
-	if(!g_ogl_config.bSupportsGLBaseVertex)
  353
+	if (!g_ogl_config.bSupportsGLBaseVertex)
354 354
 	{
355  
-		if(!DriverDetails::HasBug(DriverDetails::BUG_BROKENBUFFERSTREAM))
  355
+		if (!DriverDetails::HasBug(DriverDetails::BUG_BROKENBUFFERSTREAM))
356 356
 			return new BufferSubData(type, size);
357 357
 
358 358
 		// BufferData is by far the worst way, only use it if needed
@@ -360,7 +360,7 @@ StreamBuffer* StreamBuffer::Create(u32 type, size_t size)
360 360
 	}
361 361
 
362 362
 	// Prefer the syncing buffers over the orphaning one
363  
-	if(g_ogl_config.bSupportsGLSync)
  363
+	if (g_ogl_config.bSupportsGLSync)
364 364
 	{
365 365
 		// try to use buffer storage whenever possible
366 366
 		if (g_ogl_config.bSupportsGLBufferStorage &&
@@ -368,16 +368,16 @@ StreamBuffer* StreamBuffer::Create(u32 type, size_t size)
368 368
 			return new BufferStorage(type, size);
369 369
 
370 370
 		// pinned memory is almost as fine
371  
-		if(g_ogl_config.bSupportsGLPinnedMemory &&
  371
+		if (g_ogl_config.bSupportsGLPinnedMemory &&
372 372
 			!(DriverDetails::HasBug(DriverDetails::BUG_BROKENPINNEDMEMORY) && type == GL_ELEMENT_ARRAY_BUFFER))
373 373
 			return new PinnedMemory(type, size);
374 374
 
375 375
 		// don't fall back to MapAnd* for nvidia drivers
376  
-		if(DriverDetails::HasBug(DriverDetails::BUG_BROKENUNSYNCMAPPING))
  376
+		if (DriverDetails::HasBug(DriverDetails::BUG_BROKENUNSYNCMAPPING))
377 377
 			return new BufferSubData(type, size);
378 378
 
379 379
 		// mapping fallback
380  
-		if(g_ogl_config.bSupportsGLSync)
  380
+		if (g_ogl_config.bSupportsGLSync)
381 381
 			return new MapAndSync(type, size);
382 382
 	}
383 383
 
19  Source/Core/VideoBackends/OGL/TextureCache.cpp
@@ -84,8 +84,8 @@ bool SaveTexture(const std::string& filename, u32 textarget, u32 tex, int virtua
84 84
 {
85 85
 	if (texture)
86 86
 	{
87  
-		for(auto& gtex : s_Textures)
88  
-			if(gtex == texture)
  87
+		for (auto& gtex : s_Textures)
  88
+			if (gtex == texture)
89 89
 				gtex = 0;
90 90
 		glDeleteTextures(1, &texture);
91 91
 		texture = 0;
@@ -282,14 +282,17 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
282 282
 
283 283
 		glViewport(0, 0, virtual_width, virtual_height);
284 284
 
285  
-		if(srcFormat == PIXELFMT_Z24) {
  285
+		if (srcFormat == PIXELFMT_Z24)
  286
+		{
286 287
 			s_DepthMatrixProgram.Bind();
287  
-			if(s_DepthCbufid != cbufid)
  288
+			if (s_DepthCbufid != cbufid)
288 289
 				glUniform4fv(s_DepthMatrixUniform, 5, colmat);
289 290
 			s_DepthCbufid = cbufid;
290  
-		} else {
  291
+		}
  292
+		else
  293
+		{
291 294
 			s_ColorMatrixProgram.Bind();
292  
-			if(s_ColorCbufid != cbufid)
  295
+			if (s_ColorCbufid != cbufid)
293 296
 				glUniform4fv(s_ColorMatrixUniform, 7, colmat);
294 297
 			s_ColorCbufid = cbufid;
295 298
 		}
@@ -391,7 +394,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
391 394
 	s_DepthCopyPositionUniform = glGetUniformLocation(s_DepthMatrixProgram.glprogid, "copy_position");
392 395
 
393 396
 	s_ActiveTexture = -1;
394  
-	for(auto& gtex : s_Textures)
  397
+	for (auto& gtex : s_Textures)
395 398
 		gtex = -1;
396 399
 }
397 400
 
@@ -409,7 +412,7 @@ void TextureCache::DisableStage(unsigned int stage)
409 412
 void TextureCache::SetStage ()
410 413
 {
411 414
 	// -1 is the initial value as we don't know which testure should be bound
412  
-	if(s_ActiveTexture != (u32)-1)
  415
+	if (s_ActiveTexture != (u32)-1)
413 416
 		glActiveTexture(GL_TEXTURE0 + s_ActiveTexture);
414 417
 }
415 418
 
6  Source/Core/VideoBackends/OGL/VertexManager.cpp
@@ -106,7 +106,7 @@ void VertexManager::Draw(u32 stride)
106 106
 	u32 max_index = IndexGenerator::GetNumVerts();
107 107
 	GLenum primitive_mode = 0;
108 108
 
109  
-	switch(current_primitive_type)
  109
+	switch (current_primitive_type)
110 110
 	{
111 111
 		case PRIMITIVE_POINTS:
112 112
 			primitive_mode = GL_POINTS;
@@ -119,7 +119,7 @@ void VertexManager::Draw(u32 stride)
119 119
 			break;
120 120
 	}
121 121
 
122  
-	if(g_ogl_config.bSupportsGLBaseVertex) {
  122
+	if (g_ogl_config.bSupportsGLBaseVertex) {
123 123
 		glDrawRangeElementsBaseVertex(primitive_mode, 0, max_index, index_size, GL_UNSIGNED_SHORT, (u8*)nullptr+s_index_offset, (GLint)s_baseVertex);
124 124
 	} else {
125 125
 		glDrawRangeElements(primitive_mode, 0, max_index, index_size, GL_UNSIGNED_SHORT, (u8*)nullptr+s_index_offset);
@@ -132,7 +132,7 @@ void VertexManager::vFlush(bool useDstAlpha)
132 132
 	GLVertexFormat *nativeVertexFmt = (GLVertexFormat*)g_nativeVertexFmt;
133 133
 	u32 stride  = nativeVertexFmt->GetVertexStride();
134 134
 
135  
-	if(m_last_vao != nativeVertexFmt->VAO) {
  135
+	if (m_last_vao != nativeVertexFmt->VAO) {
136 136
 		glBindVertexArray(nativeVertexFmt->VAO);
137 137
 		m_last_vao = nativeVertexFmt->VAO;
138 138
 	}
18  Source/Core/VideoBackends/Software/Clipper.cpp
@@ -179,7 +179,7 @@
179 179
 
180 180
 		if (mask != 0)
181 181
 		{
182  
-			for(int i = 0; i < 3; i += 3)
  182
+			for (int i = 0; i < 3; i += 3)
183 183
 			{
184 184
 				int vlist[2][2*6+1];
185 185
 				int *inlist = vlist[0], *outlist = vlist[1];
@@ -273,7 +273,7 @@
273 273
 
274 274
 		bool backface;
275 275
 
276  
-		if(!CullTest(v0, v1, v2, backface))
  276
+		if (!CullTest(v0, v1, v2, backface))
277 277
 			return;
278 278
 
279 279
 		int indices[NUM_INDICES] = { 0, 1, 2, SKIP_FLAG, SKIP_FLAG, SKIP_FLAG, SKIP_FLAG, SKIP_FLAG, SKIP_FLAG,
@@ -296,10 +296,10 @@
296 296
 
297 297
 		ClipTriangle(indices, numIndices);
298 298
 
299  
-		for(int i = 0; i+3 <= numIndices; i+=3)
  299
+		for (int i = 0; i+3 <= numIndices; i+=3)
300 300
 		{
301 301
 			_assert_(i < NUM_INDICES);
302  
-			if(indices[i] != SKIP_FLAG)
  302
+			if (indices[i] != SKIP_FLAG)
303 303
 			{
304 304
 				PerspectiveDivide(Vertices[indices[i]]);
305 305
 				PerspectiveDivide(Vertices[indices[i+1]]);
@@ -339,7 +339,7 @@
339 339
 
340 340
 		ClipLine(indices);
341 341
 
342  
-		if(indices[0] != SKIP_FLAG)
  342
+		if (indices[0] != SKIP_FLAG)
343 343
 		{
344 344
 			OutputVertexData *v0 = Vertices[indices[0]];
345 345
 			OutputVertexData *v1 = Vertices[indices[1]];
@@ -353,16 +353,16 @@
353 353
 			float screenDx = 0;
354 354
 			float screenDy = 0;
355 355
 
356  
-			if(fabsf(dx) > fabsf(dy))
  356
+			if (fabsf(dx) > fabsf(dy))
357 357
 			{
358  
-				if(dx > 0)
  358
+				if (dx > 0)
359 359
 					screenDy = bpmem.lineptwidth.linesize / -12.0f;
360 360
 				else
361 361
 					screenDy = bpmem.lineptwidth.linesize / 12.0f;
362 362
 			}
363 363
 			else
364 364
 			{
365  
-				if(dy > 0)
  365
+				if (dy > 0)
366 366
 					screenDx = bpmem.lineptwidth.linesize / 12.0f;
367 367
 				else
368 368
 					screenDx = bpmem.lineptwidth.linesize / -12.0f;
@@ -389,7 +389,7 @@
389 389
 		mask &= CalcClipMask(v1);
390 390
 		mask &= CalcClipMask(v2);
391 391
 
392  
-		if(mask)
  392
+		if (mask)
393 393
 		{
394 394
 			INCSTAT(swstats.thisFrame.numTrianglesRejected)
395 395
 			return false;
2  Source/Core/VideoBackends/Software/DebugUtil.cpp
@@ -84,7 +84,7 @@ s32 GetMaxTextureLod(u32 texmap)
84 84
 	u8 mip = maxLod >> 4;
85 85
 	u8 fract = maxLod & 0xf;
86 86
 
87  
-	if(fract)
  87
+	if (fract)
88 88
 		++mip;
89 89
 
90 90
 	return (s32)mip;
2  Source/Core/VideoBackends/Software/EfbCopy.cpp
@@ -34,7 +34,7 @@
34 34
 			INFO_LOG(VIDEO, "xfbaddr: %x, fbwidth: %i, fbheight: %i, source: (%i, %i, %i, %i), Gamma %f",
35 35
 					 xfbAddr, fbWidth, fbHeight, sourceRc.top, sourceRc.left, sourceRc.bottom, sourceRc.right, Gamma);
36 36
 
37  
-			if(!g_SWVideoConfig.bBypassXFB)
  37
+			if (!g_SWVideoConfig.bBypassXFB)
38 38
 			{
39 39
 				EfbInterface::yuv422_packed* xfb_in_ram = (EfbInterface::yuv422_packed *) Memory::GetPointer(xfbAddr);
40 40
 
2  Source/Core/VideoBackends/Software/EfbInterface.cpp
@@ -552,7 +552,7 @@
552 552
 
553 553
 	// Like CopyToXFB, but we copy directly into the opengl colour texture without going via Gamecube main memory or doing a yuyv conversion
554 554
 	void BypassXFB(u8* texture, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc, float Gamma) {
555  
-		if(fbWidth*fbHeight > 640*568) {
  555
+		if (fbWidth*fbHeight > 640*568) {
556 556
 			ERROR_LOG(VIDEO, "Framebuffer is too large: %ix%i", fbWidth, fbHeight);
557 557
 			return;
558 558
 		}
4  Source/Core/VideoBackends/Software/OpcodeDecoder.cpp
@@ -139,7 +139,7 @@ void DecodeStandard(u32 bufferSize)
139 139
 		DebugUtil::OnObjectBegin();
140 140
 	}
141 141
 #endif
142  
-	switch(Cmd)
  142
+	switch (Cmd)
143 143
 	{
144 144
 	case GX_NOP:
145 145
 		break;
@@ -250,7 +250,7 @@ bool CommandRunnable(u32 iBufferSize)
250 250
 		u8 Cmd = DataPeek8(0);
251 251
 		u32 minSize = 1;
252 252
 
253  
-		switch(Cmd)
  253
+		switch (Cmd)
254 254
 		{
255 255
 		case GX_LOAD_CP_REG: //0x08
256 256
 			minSize = 6;
38  Source/Core/VideoBackends/Software/Rasterizer.cpp
@@ -87,7 +87,7 @@ inline int iround(float x)
87 87
 	int t;
88 88
 
89 89
 	t = (int)x;
90  
-	if((x - t) >= 0.5)
  90
+	if ((x - t) >= 0.5)
91 91
 		return t + 1;
92 92
 
93 93
 	return t;
@@ -149,7 +149,7 @@ inline void Draw(s32 x, s32 y, s32 xi, s32 yi)
149 149
 	//  colors
150 150
 	for (unsigned int i = 0; i < bpmem.genMode.numcolchans; i++)
151 151
 	{
152  
-		for(int comp = 0; comp < 4; comp++)
  152
+		for (int comp = 0; comp < 4; comp++)
153 153
 		{
154 154
 			u16 color = (u16)ColorSlopes[i][comp].GetValue(dx, dy);
155 155
 
@@ -299,7 +299,7 @@ void BuildBlock(s32 blockX, s32 blockY)
299 299
 	{
300 300
 		int stageOdd = i&1;
301 301
 		TwoTevStageOrders &order = bpmem.tevorders[i >> 1];
302  
-		if(order.getEnable(stageOdd))
  302
+		if (order.getEnable(stageOdd))
303 303
 		{
304 304
 			u32 texmap = order.getTexMap(stageOdd);
305 305
 			u32 texcoord = order.getTexCoord(stageOdd);
@@ -384,15 +384,15 @@ void DrawTriangleFrontFace(OutputVertexData *v0, OutputVertexData *v1, OutputVer
384 384
 	if (!bpmem.genMode.zfreeze || !g_SWVideoConfig.bZFreeze)
385 385
 		InitSlope(&ZSlope, v0->screenPosition[2], v1->screenPosition[2], v2->screenPosition[2], fltdx31, fltdx12, fltdy12, fltdy31);
386 386
 
387  
-	for(unsigned int i = 0; i < bpmem.genMode.numcolchans; i++)
  387
+	for (unsigned int i = 0; i < bpmem.genMode.numcolchans; i++)
388 388
 	{
389  
-		for(int comp = 0; comp < 4; comp++)
  389
+		for (int comp = 0; comp < 4; comp++)
390 390
 			InitSlope(&ColorSlopes[i][comp], v0->color[i][comp], v1->color[i][comp], v2->color[i][comp], fltdx31, fltdx12, fltdy12, fltdy31);
391 391
 	}
392 392
 
393  
-	for(unsigned int i = 0; i < bpmem.genMode.numtexgens; i++)
  393
+	for (unsigned int i = 0; i < bpmem.genMode.numtexgens; i++)
394 394
 	{
395  
-		for(int comp = 0; comp < 3; comp++)
  395
+		for (int comp = 0; comp < 3; comp++)
396 396
 			InitSlope(&TexSlopes[i][comp], v0->texCoords[i][comp] * w[0], v1->texCoords[i][comp] * w[1], v2->texCoords[i][comp] * w[2], fltdx31, fltdx12, fltdy12, fltdy31);
397 397
 	}
398 398
 
@@ -406,14 +406,14 @@ void DrawTriangleFrontFace(OutputVertexData *v0, OutputVertexData *v1, OutputVer
406 406
 	s32 C3 = DY31 * X3 - DX31 * Y3;
407 407
 
408 408
 	// Correct for fill convention
409  
-	if(DY12 < 0 || (DY12 == 0 && DX12 > 0)) C1++;
410  
-	if(DY23 < 0 || (DY23 == 0 && DX23 > 0)) C2++;
411  
-	if(DY31 < 0 || (DY31 == 0 && DX31 > 0)) C3++;
  409
+	if (DY12 < 0 || (DY12 == 0 && DX12 > 0)) C1++;
  410
+	if (DY23 < 0 || (DY23 == 0 && DX23 > 0)) C2++;
  411
+	if (DY31 < 0 || (DY31 == 0 && DX31 > 0)) C3++;
412 412
 
413 413
 	// Loop through blocks
414  
-	for(s32 y = miny; y < maxy; y += BLOCK_SIZE)
  414
+	for (s32 y = miny; y < maxy; y += BLOCK_SIZE)
415 415
 	{
416  
-		for(s32 x = minx; x < maxx; x += BLOCK_SIZE)
  416
+		for (s32 x = minx; x < maxx; x += BLOCK_SIZE)
417 417
 		{
418 418
 			// Corners of block
419 419
 			s32 x0 = x << 4;
@@ -441,17 +441,17 @@ void DrawTriangleFrontFace(OutputVertexData *v0, OutputVertexData *v1, OutputVer
441 441
 			int c = (c00 << 0) | (c10 << 1) | (c01 << 2) | (c11 << 3);
442 442
 
443 443
 			// Skip block when outside an edge
444  
-			if(a == 0x0 || b == 0x0 || c == 0x0)
  444
+			if (a == 0x0 || b == 0x0 || c == 0x0)
445 445
 				continue;
446 446
 
447 447
 			BuildBlock(x, y);
448 448
 
449 449
 			// Accept whole block when totally covered
450  
-			if(a == 0xF && b == 0xF && c == 0xF)
  450
+			if (a == 0xF && b == 0xF && c == 0xF)
451 451
 			{
452  
-				for(s32 iy = 0; iy < BLOCK_SIZE; iy++)
  452
+				for (s32 iy = 0; iy < BLOCK_SIZE; iy++)
453 453
 				{
454  
-					for(s32 ix = 0; ix < BLOCK_SIZE; ix++)
  454
+					for (s32 ix = 0; ix < BLOCK_SIZE; ix++)
455 455
 					{
456 456
 						Draw(x + ix, y + iy, ix, iy);
457 457
 					}
@@ -463,15 +463,15 @@ void DrawTriangleFrontFace(OutputVertexData *v0, OutputVertexData *v1, OutputVer
463 463
 				s32 CY2 = C2 + DX23 * y0 - DY23 * x0;
464 464
 				s32 CY3 = C3 + DX31 * y0 - DY31 * x0;
465 465
 
466  
-				for(s32 iy = 0; iy < BLOCK_SIZE; iy++)
  466
+				for (s32 iy = 0; iy < BLOCK_SIZE; iy++)
467 467
 				{
468 468
 					s32 CX1 = CY1;
469 469
 					s32 CX2 = CY2;
470 470
 					s32 CX3 = CY3;
471 471
 
472  
-					for(s32 ix = 0; ix < BLOCK_SIZE; ix++)
  472
+					for (s32 ix = 0; ix < BLOCK_SIZE; ix++)
473 473
 					{
474  
-						if(CX1 > 0 && CX2 > 0 && CX3 > 0)
  474
+						if (CX1 > 0 && CX2 > 0 && CX3 > 0)
475 475
 						{
476 476
 							Draw(x + ix, y + iy, ix, iy);
477 477
 						}
2  Source/Core/VideoBackends/Software/SWRenderer.cpp
@@ -160,7 +160,7 @@ void SWRenderer::swapColorTexture() {
160 160
 
161 161
 void SWRenderer::UpdateColorTexture(EfbInterface::yuv422_packed *xfb, u32 fbWidth, u32 fbHeight)
162 162
 {
163  
-	if(fbWidth*fbHeight > 640*568) {
  163
+	if (fbWidth*fbHeight > 640*568) {
164 164
 		ERROR_LOG(VIDEO, "Framebuffer is too large: %ix%i", fbWidth, fbHeight);
165 165
 		return;
166 166
 	}
2  Source/Core/VideoBackends/Software/SWmain.cpp
@@ -223,7 +223,7 @@ void VideoSoftware::Video_EndField()
223 223
 	}
224 224
 	if (!g_SWVideoConfig.bHwRasterizer)
225 225
 	{
226  
-		if(!g_SWVideoConfig.bBypassXFB)
  226
+		if (!g_SWVideoConfig.bBypassXFB)
227 227
 		{
228 228
 			EfbInterface::yuv422_packed *xfb = (EfbInterface::yuv422_packed *) Memory::GetPointer(s_beginFieldArgs.xfbAddr);
229 229
 
2  Source/Core/VideoBackends/Software/SetupUnit.cpp
@@ -22,7 +22,7 @@ void SetupUnit::Init(u8 primitiveType)
22 22
 
23 23
 void SetupUnit::SetupVertex()
24 24
 {
25  
-	switch(m_PrimType)
  25
+	switch (m_PrimType)
26 26
 	{
27 27
 	case GX_DRAW_QUADS:
28 28
 		SetupQuad();
12  Source/Core/VideoBackends/Software/Tev.cpp
@@ -126,7 +126,7 @@ inline s16 Clamp1024(s16 in)
126 126
 
127 127
 void Tev::SetRasColor(int colorChan, int swaptable)
128 128
 {
129  
-	switch(colorChan)
  129
+	switch (colorChan)
130 130
 	{
131 131
 	case 0: // Color0
132 132
 		{
@@ -209,7 +209,7 @@ void Tev::DrawColorCompare(TevStageCombiner::ColorCombiner &cc)
209 209
 
210 210
 	InputRegType InputReg;
211 211
 
212  
-	switch(cmp) {
  212
+	switch (cmp) {
213 213
 	case TEVCMP_R8_GT:
214 214
 		{
215 215
 			a = *m_ColorInputLUT[cc.a][RED_INP] & 0xff;
@@ -336,7 +336,7 @@ void Tev::DrawAlphaCompare(TevStageCombiner::AlphaCombiner &ac)
336 336
 
337 337
 	InputRegType InputReg;
338 338
 
339  
-	switch(cmp) {
  339
+	switch (cmp) {
340 340
 	case TEVCMP_R8_GT:
341 341
 		{
342 342
 			a = m_AlphaInputLUT[ac.a][RED_C] & 0xff;
@@ -415,7 +415,7 @@ void Tev::DrawAlphaCompare(TevStageCombiner::AlphaCombiner &ac)
415 415
 
416 416
 static bool AlphaCompare(int alpha, int ref, int comp)
417 417
 {
418  
-	switch(comp) {
  418
+	switch (comp) {
419 419
 	case ALPHACMP_ALWAYS:  return true;
420 420
 	case ALPHACMP_NEVER:   return false;
421 421
 	case ALPHACMP_LEQUAL:  return alpha <= ref;
@@ -497,7 +497,7 @@ void Tev::Indirect(unsigned int stageNum, s32 s, s32 t)
497 497
 	bias[2] = indirect.bias&4?biasValue:0;
498 498
 
499 499
 	// format
500  
-	switch(indirect.fmt)
  500
+	switch (indirect.fmt)
501 501
 	{
502 502
 		case ITF_8:
503 503
 			indcoord[0] = indmap[TextureSampler::ALP_SMP] + bias[0];
@@ -756,7 +756,7 @@ void Tev::Draw()
756 756
 
757 757
 		}
758 758
 
759  
-		if(bpmem.fogRange.Base.Enabled)
  759
+		if (bpmem.fogRange.Base.Enabled)
760 760
 		{
761 761
 			// TODO: This is untested and should definitely be checked against real hw.
762 762
 			// - No idea if offset is really normalized against the viewport width or against the projection matrix or yet something else
12  Source/Core/VideoBackends/Software/TextureEncoder.cpp
@@ -261,7 +261,7 @@ void EncodeRGBA6(u8 *dst, u8 *src, u32 format)
261 261
 	u32 readStride = 3;
262 262
 	u8 *dstBlockStart = dst;
263 263
 
264  
-	switch(format)
  264
+	switch (format)
265 265
 	{
266 266
 	case GX_TF_I4:
267 267
 		SetBlockDimensions(3, 3, sBlkCount, tBlkCount, sBlkSize, tBlkSize);
@@ -498,7 +498,7 @@ void EncodeRGBA6halfscale(u8 *dst, u8 *src, u32 format)
498 498
 	u32 readStride = 6;
499 499
 	u8 *dstBlockStart = dst;
500 500
 
501  
-	switch(format)
  501
+	switch (format)
502 502
 	{
503 503
 	case GX_TF_I4:
504 504
 		SetBlockDimensions(3, 3, sBlkCount, tBlkCount, sBlkSize, tBlkSize);
@@ -732,7 +732,7 @@ void EncodeRGB8(u8 *dst, u8 *src, u32 format)
732 732
 	u32 readStride = 3;
733 733
 	u8 *dstBlockStart = dst;
734 734
 
735  
-	switch(format)
  735
+	switch (format)
736 736
 	{
737 737
 	case GX_TF_I4:
738 738
 		SetBlockDimensions(3, 3, sBlkCount, tBlkCount, sBlkSize, tBlkSize);
@@ -947,7 +947,7 @@ void EncodeRGB8halfscale(u8 *dst, u8 *src, u32 format)
947 947
 	u32 readStride = 6;
948 948
 	u8 *dstBlockStart = dst;
949 949
 
950  
-	switch(format)
  950
+	switch (format)
951 951
 	{
952 952
 	case GX_TF_I4:
953 953
 		SetBlockDimensions(3, 3, sBlkCount, tBlkCount, sBlkSize, tBlkSize);
@@ -1177,7 +1177,7 @@ void EncodeZ24(u8 *dst, u8 *src, u32 format)
1177 1177
 	u32 readStride = 3;
1178 1178
 	u8 *dstBlockStart = dst;
1179 1179
 
1180  
-	switch(format)
  1180
+	switch (format)
1181 1181
 	{
1182 1182
 	case GX_TF_Z8:
1183 1183
 		SetBlockDimensions(3, 2, sBlkCount, tBlkCount, sBlkSize, tBlkSize);
@@ -1282,7 +1282,7 @@ void EncodeZ24halfscale(u8 *dst, u8 *src, u32 format)
1282 1282
 	u8 r, g, b;
1283 1283
 	u8 *dstBlockStart = dst;
1284 1284
 
1285  
-	switch(format)
  1285
+	switch (format)
1286 1286
 	{
1287 1287
 	case GX_TF_Z8:
1288 1288
 		SetBlockDimensions(3, 2, sBlkCount, tBlkCount, sBlkSize, tBlkSize);
2  Source/Core/VideoCommon/AVIDump.cpp
@@ -324,7 +324,7 @@ void AVIDump::AddFrame(const u8* data, int width, int height)
324 324
 		if (s_Stream->codec->coded_frame->pts != (unsigned int)AV_NOPTS_VALUE)
325 325
 			pkt.pts = av_rescale_q(s_Stream->codec->coded_frame->pts,
326 326
 					s_Stream->codec->time_base, s_Stream->time_base);
327  
-		if(s_Stream->codec->coded_frame->key_frame)
  327
+		if (s_Stream->codec->coded_frame->key_frame)
328 328
 			pkt.flags |= AV_PKT_FLAG_KEY;
329 329
 		pkt.stream_index = s_Stream->index;
330 330
 		pkt.data = s_OutBuffer;
8  Source/Core/VideoCommon/BPMemory.h
@@ -340,9 +340,9 @@ struct TevStageCombiner
340 340
 
341 341
 // several discoveries:
342 342
 // GXSetTevIndBumpST(tevstage, indstage, matrixind)
343  
-//  if( matrix == 2 ) realmat = 6; // 10
344  
-//  else if( matrix == 3 ) realmat = 7; // 11
345  
-//  else if( matrix == 1 ) realmat = 5; // 9
  343
+//  if ( matrix == 2 ) realmat = 6; // 10
  344
+//  else if ( matrix == 3 ) realmat = 7; // 11
  345
+//  else if ( matrix == 1 ) realmat = 5; // 9
346 346
 //  GXSetTevIndirect(tevstage, indstage, 0, 3, realmat, 6, 6, 0, 0, 0)
347 347
 //  GXSetTevIndirect(tevstage+1, indstage, 0, 3, realmat+4, 6, 6, 1, 0, 0)
348 348
 //  GXSetTevIndirect(tevstage+2, indstage, 0, 0, 0, 0, 0, 1, 0, 0)
@@ -886,7 +886,7 @@ struct TevReg
886 886
 
887 887
 	inline TEST_RESULT TestResult() const
888 888
 	{
889  
-		switch(logic)
  889
+		switch (logic)
890 890
 		{
891 891
 		case 0: // AND
892 892
 			if (comp0 == ALPHACMP_ALWAYS && comp1 == ALPHACMP_ALWAYS)
50  Source/Core/VideoCommon/BPStructs.cpp
@@ -66,17 +66,17 @@ void BPWritten(const BPCmd& bp)
66 66
 
67 67
 	if (((s32*)&bpmem)[bp.address] == bp.newvalue)
68 68
 	{
69  
-		if (!(bp.address == BPMEM_TRIGGER_EFB_COPY
70  
-				|| bp.address == BPMEM_CLEARBBOX1
71  
-				|| bp.address == BPMEM_CLEARBBOX2
72  
-				|| bp.address == BPMEM_SETDRAWDONE
73  
-				|| bp.address == BPMEM_PE_TOKEN_ID
74  
-				|| bp.address == BPMEM_PE_TOKEN_INT_ID
75  
-				|| bp.address == BPMEM_LOADTLUT0
76  
-				|| bp.address == BPMEM_LOADTLUT1
77  
-				|| bp.address == BPMEM_TEXINVALIDATE
78  
-				|| bp.address == BPMEM_PRELOAD_MODE
79  
-				|| bp.address == BPMEM_CLEAR_PIXEL_PERF))
  69
+		if (!(bp.address == BPMEM_TRIGGER_EFB_COPY ||
  70
+		      bp.address == BPMEM_CLEARBBOX1 ||
  71
+		      bp.address == BPMEM_CLEARBBOX2 ||
  72
+		      bp.address == BPMEM_SETDRAWDONE ||
  73
+		      bp.address == BPMEM_PE_TOKEN_ID ||
  74
+		      bp.address == BPMEM_PE_TOKEN_INT_ID ||
  75
+		      bp.address == BPMEM_LOADTLUT0 ||
  76
+		      bp.address == BPMEM_LOADTLUT1 ||
  77
+		      bp.address == BPMEM_TEXINVALIDATE ||
  78
+		      bp.address == BPMEM_PRELOAD_MODE ||
  79
+		      bp.address == BPMEM_CLEAR_PIXEL_PERF))
80 80
 		{
81 81
 			return;
82 82
 		}
@@ -91,9 +91,9 @@ void BPWritten(const BPCmd& bp)
91 91
 	case BPMEM_GENMODE: // Set the Generation Mode
92 92
 		{
93 93
 			PRIM_LOG("genmode: texgen=%d, col=%d, multisampling=%d, tev=%d, cullmode=%d, ind=%d, zfeeze=%d",
94  
-			bpmem.genMode.numtexgens, bpmem.genMode.numcolchans,
95  
-			bpmem.genMode.multisampling, bpmem.genMode.numtevstages+1, bpmem.genMode.cullmode,
96  
-			bpmem.genMode.numindstages, bpmem.genMode.zfreeze);
  94
+			         bpmem.genMode.numtexgens, bpmem.genMode.numcolchans,
  95
+			         bpmem.genMode.multisampling, bpmem.genMode.numtevstages+1, bpmem.genMode.cullmode,
  96
+			         bpmem.genMode.numindstages, bpmem.genMode.zfreeze);
97 97
 
98 98
 			// Only call SetGenerationMode when cull mode changes.
99 99
 			if (bp.changes & 0xC000)
@@ -109,15 +109,15 @@ void BPWritten(const BPCmd& bp)
109 109
 	case BPMEM_IND_MTXA+6:
110 110
 	case BPMEM_IND_MTXB+6:
111 111
 	case BPMEM_IND_MTXC+6:
112  
-		if(bp.changes)
  112
+		if (bp.changes)
113 113
 			PixelShaderManager::SetIndMatrixChanged((bp.address - BPMEM_IND_MTXA) / 3);
114 114
 		break;
115 115
 	case BPMEM_RAS1_SS0: // Index Texture Coordinate Scale 0
116  
-		if(bp.changes)
  116
+		if (bp.changes)
117 117
 			PixelShaderManager::SetIndTexScaleChanged(false);
118 118
 		break;
119 119
 	case BPMEM_RAS1_SS1: // Index Texture Coordinate Scale 1
120  
-		if(bp.changes)
  120
+		if (bp.changes)
121 121
 			PixelShaderManager::SetIndTexScaleChanged(true);
122 122
 		break;
123 123
 	// ----------------
@@ -166,9 +166,9 @@ void BPWritten(const BPCmd& bp)
166 166
 	case BPMEM_CONSTANTALPHA: // Set Destination Alpha
167 167
 		{
168 168
 			PRIM_LOG("constalpha: alp=%d, en=%d", bpmem.dstalpha.alpha, bpmem.dstalpha.enable);
169  
-			if(bp.changes & 0xFF)
  169
+			if (bp.changes & 0xFF)
170 170
 				PixelShaderManager::SetDestAlpha();
171  
-			if(bp.changes & 0x100)
  171
+			if (bp.changes & 0x100)
172 172
 				SetBlendMode();
173 173
 			break;
174 174
 		}
@@ -306,14 +306,14 @@ void BPWritten(const BPCmd& bp)
306 306
 	case BPMEM_ALPHACOMPARE: // Compare Alpha Values
307 307
 		PRIM_LOG("alphacmp: ref0=%d, ref1=%d, comp0=%d, comp1=%d, logic=%d", bpmem.alpha_test.ref0,
308 308
 				bpmem.alpha_test.ref1, bpmem.alpha_test.comp0, bpmem.alpha_test.comp1, bpmem.alpha_test.logic);
309  
-		if(bp.changes & 0xFFFF)
  309
+		if (bp.changes & 0xFFFF)
310 310
 			PixelShaderManager::SetAlpha();
311  
-		if(bp.changes)
  311
+		if (bp.changes)
312 312
 			g_renderer->SetColorMask();
313 313
 		break;
314 314
 	case BPMEM_BIAS: // BIAS
315 315
 		PRIM_LOG("ztex bias=0x%x", bpmem.ztex1.bias);
316  
-		if(bp.changes)
  316
+		if (bp.changes)
317 317
 			PixelShaderManager::SetZTextureBias();
318 318
 		break;
319 319
 	case BPMEM_ZTEX2: // Z Texture type
@@ -390,7 +390,7 @@ void BPWritten(const BPCmd& bp)
390 390
 
391 391
 	case BPMEM_ZCOMPARE:      // Set the Z-Compare and EFB pixel format
392 392
 		OnPixelFormatChange();
393  
-		if(bp.changes & 7)
  393
+		if (bp.changes & 7)
394 394
 		{
395 395
 			SetBlendMode(); // dual source could be activated by changing to PIXELFMT_RGBA6_Z24
396 396
 			g_renderer->SetColorMask(); // alpha writing needs to be disabled if the new pixel format doesn't have an alpha channel
@@ -424,7 +424,7 @@ void BPWritten(const BPCmd& bp)
424 424
 
425 425
 	case BPMEM_CLEAR_PIXEL_PERF:
426 426
 		// GXClearPixMetric writes 0xAAA here, Sunshine alternates this register between values 0x000 and 0xAAA
427  
-		if(PerfQueryBase::ShouldEmulate())
  427
+		if (PerfQueryBase::ShouldEmulate())
428 428
 			g_perf_query->ResetQuery();
429 429
 		break;
430 430
 
@@ -505,7 +505,7 @@ void BPWritten(const BPCmd& bp)
505 505
 		case BPMEM_SU_TSIZE+12:
506 506
 		case BPMEM_SU_SSIZE+14:
507 507
 		case BPMEM_SU_TSIZE+14:
508  
-			if(bp.changes)
  508
+			if (bp.changes)
509 509
 				PixelShaderManager::SetTexCoordChanged((bp.address - BPMEM_SU_SSIZE) >> 1);
510 510
 			break;
511 511
 		// ------------------------
11  Source/Core/VideoCommon/CommandProcessor.cpp
@@ -310,8 +310,9 @@ void STACKALIGN GatherPipeBursted()
310 310
 		{
311 311
 			// In multibuffer mode is not allowed write in the same FIFO attached to the GPU.
312 312
 			// Fix Pokemon XD in DC mode.
313  
-			if((ProcessorInterface::Fifo_CPUEnd == fifo.CPEnd) && (ProcessorInterface::Fifo_CPUBase == fifo.CPBase)
314  
-				 && fifo.CPReadWriteDistance > 0)
  313
+			if ((ProcessorInterface::Fifo_CPUEnd == fifo.CPEnd) &&
  314
+			    (ProcessorInterface::Fifo_CPUBase == fifo.CPBase) &&
  315
+			    fifo.CPReadWriteDistance > 0)
315 316
 			{
316 317
 				ProcessFifoAllDistance();
317 318
 			}
@@ -509,17 +510,17 @@ void SetCpControlRegister()
509 510
 	fifo.bFF_LoWatermarkInt = m_CPCtrlReg.FifoUnderflowIntEnable;
510 511
 	fifo.bFF_GPLinkEnable = m_CPCtrlReg.GPLinkEnable;
511 512
 
512  
-	if(m_CPCtrlReg.GPReadEnable && m_CPCtrlReg.GPLinkEnable)
  513
+	if (m_CPCtrlReg.GPReadEnable && m_CPCtrlReg.GPLinkEnable)
513 514
 	{
514 515
 		ProcessorInterface::Fifo_CPUWritePointer = fifo.CPWritePointer;
515 516
 		ProcessorInterface::Fifo_CPUBase = fifo.CPBase;
516 517
 		ProcessorInterface::Fifo_CPUEnd = fifo.CPEnd;
517 518
 	}
518 519
 
519  
-	if(fifo.bFF_GPReadEnable && !m_CPCtrlReg.GPReadEnable)
  520
+	if (fifo.bFF_GPReadEnable && !m_CPCtrlReg.GPReadEnable)
520 521
 	{
521 522
 		fifo.bFF_GPReadEnable = m_CPCtrlReg.GPReadEnable;
522  
-		while(fifo.isGpuReadingData) Common::YieldCPU();
  523
+		while (fifo.isGpuReadingData) Common::YieldCPU();
523 524
 	}
524 525
 	else
525 526
 	{
4  Source/Core/VideoCommon/Debugger.cpp
@@ -54,7 +54,7 @@ void GFXDebuggerCheckAndPause(bool update)
54 54
 	if (GFXDebuggerPauseFlag)
55 55
 	{
56 56
 		g_pdebugger->OnPause();
57  
-		while( GFXDebuggerPauseFlag )
  57
+		while ( GFXDebuggerPauseFlag )
58 58
 		{
59 59
 			g_video_backend->UpdateFPSDisplay("Paused by Video Debugger");
60 60
 
@@ -93,7 +93,7 @@ void GFXDebuggerBase::DumpPixelShader(const char* path)
93 93
 	}
94 94
 	else
95 95
 	{
96  
-		if(g_ActiveConfig.backend_info.bSupportsDualSourceBlend)
  96
+		if (g_ActiveConfig.backend_info.bSupportsDualSourceBlend)
97 97
 		{
98 98
 			output = "Using dual source blending for destination alpha:\n";
99 99
 ///			output += GeneratePixelShaderCode(DSTALPHA_DUAL_SOURCE_BLEND, g_ActiveConfig.backend_info.APIType, g_nativeVertexFmt->m_components);
17  Source/Core/VideoCommon/DriverDetails.cpp
@@ -69,7 +69,7 @@
69 69
 		m_family = family;
70 70
 
71 71
 		if (driver == DRIVER_UNKNOWN)
72  
-			switch(vendor)
  72
+			switch (vendor)
73 73
 			{
74 74
 				case VENDOR_NVIDIA:
75 75
 				case VENDOR_TEGRA:
@@ -91,15 +91,14 @@
91 91
 					break;
92 92
 			}
93 93
 
94  
-		for(auto& bug : m_known_bugs)
  94
+		for (auto& bug : m_known_bugs)
95 95
 		{
96  
-			if(
97  
-				( bug.m_os & m_os ) &&
98  
-				( bug.m_vendor == m_vendor || bug.m_vendor == VENDOR_ALL ) &&
99  
-				( bug.m_driver == m_driver || bug.m_driver == DRIVER_ALL ) &&
100  
-				( bug.m_family == m_family || bug.m_family == -1) &&
101  
-				( bug.m_versionstart <= m_version || bug.m_versionstart == -1 ) &&
102  
-				( bug.m_versionend > m_version || bug.m_versionend == -1 )
  96
+			if (( bug.m_os & m_os ) &&
  97
+			    ( bug.m_vendor == m_vendor || bug.m_vendor == VENDOR_ALL ) &&
  98
+			    ( bug.m_driver == m_driver || bug.m_driver == DRIVER_ALL ) &&
  99
+			    ( bug.m_family == m_family || bug.m_family == -1) &&
  100
+			    ( bug.m_versionstart <= m_version || bug.m_versionstart == -1 ) &&
  101
+			    ( bug.m_versionend > m_version || bug.m_versionend == -1 )
103 102
 			)
104 103
 				m_bugs.insert(std::make_pair(bug.m_bug, bug));
105 104
 		}
4  Source/Core/VideoCommon/EmuWindow.cpp
@@ -43,7 +43,7 @@ HWND GetParentWnd()
43 43
 
44 44
 LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
45 45
 {
46  
-	switch( iMsg )
  46
+	switch ( iMsg )
47 47
 	{
48 48
 	case WM_PAINT:
49 49
 		{
@@ -65,7 +65,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
65 65
 	/* Post the mouse events to the main window, it's necessary, because the difference between the
66 66
 	   keyboard inputs is that these events only appear here, not in the parent window or any other WndProc()*/
67 67
 	case WM_LBUTTONDOWN:
68  
-		if(g_ActiveConfig.backend_info.bSupports3DVision && g_ActiveConfig.b3DVision)
  68
+		if (g_ActiveConfig.backend_info.bSupports3DVision && g_ActiveConfig.b3DVision)
69 69
 		{
70 70
 			// This basically throws away the left button down input when b3DVision is activated so WX
71 71
 			// can't get access to it, stopping focus pulling on mouse click.
4  Source/Core/VideoCommon/Fifo.cpp
@@ -95,7 +95,7 @@ void ExitGpuLoop()
95 95
 	// This should break the wait loop in CPU thread
96 96
 	CommandProcessor::fifo.bFF_GPReadEnable = false;
97 97
 	SCPFifoStruct &fifo = CommandProcessor::fifo;
98  
-	while(fifo.isGpuReadingData) Common::YieldCPU();
  98
+	while (fifo.isGpuReadingData) Common::YieldCPU();
99 99
 	// Terminate GPU thread loop
100 100
 	GpuRunningState = false;
101 101
 	EmuRunningState = true;
@@ -180,7 +180,7 @@ void RunGpuLoop()
180 180
 
181 181
 				Common::AtomicStore(fifo.CPReadPointer, readPtr);
182 182
 				Common::AtomicAdd(fifo.CPReadWriteDistance, -32);
183  
-				if((GetVideoBufferEndPtr() - g_pVideoData) == 0)
  183
+				if ((GetVideoBufferEndPtr() - g_pVideoData) == 0)
184 184
 					Common::AtomicStore(fifo.SafeCPReadPointer, fifo.CPReadPointer);
185 185
 			}
186 186
 
16  Source/Core/VideoCommon/IndexGenerator.cpp
@@ -19,7 +19,7 @@
19 19
 
20 20
 void IndexGenerator::Init()
21 21
 {
22  
-	if(g_Config.backend_info.bSupportsPrimitiveRestart)
  22
+	if (g_Config.backend_info.bSupportsPrimitiveRestart)
23 23
 	{
24 24
 		primitive_table[0] = IndexGenerator::AddQuads<true>;
25 25
 		primitive_table[2] = IndexGenerator::AddList<true>;
@@ -58,7 +58,7 @@ void IndexGenerator::AddIndices(int primitive, u32 numVerts)
58 58
 	*Iptr++ = index1;
59 59
 	*Iptr++ = index2;
60 60
 	*Iptr++ = index3;
61  
-	if(pr)
  61
+	if (pr)
62 62
 		*Iptr++ = s_primitive_restart;
63 63
 	return Iptr;
64 64
 }
@@ -74,7 +74,7 @@ void IndexGenerator::AddIndices(int primitive, u32 numVerts)
74 74
 
75 75
 template <bool pr> u16* IndexGenerator::AddStrip(u16 *Iptr, u32 const numVerts, u32 index)
76 76
 {
77  
-	if(pr)
  77
+	if (pr)
78 78
 	{
79 79
 		for (u32 i = 0; i < numVerts; ++i)
80 80
 		{
@@ -122,9 +122,9 @@ void IndexGenerator::AddIndices(int primitive, u32 numVerts)
122 122
 {
123 123
 	u32 i = 2;
124 124
 
125  
-	if(pr)
  125
+	if (pr)
126 126
 	{
127  
-		for(; i+3<=numVerts; i+=3)
  127
+		for (; i+3<=numVerts; i+=3)
128 128
 		{
129 129
 			*Iptr++ = index + i - 1;
130 130
 			*Iptr++ = index + i + 0;
@@ -134,7 +134,7 @@ void IndexGenerator::AddIndices(int primitive, u32 numVerts)
134 134
 			*Iptr++ = s_primitive_restart;
135 135
 		}
136 136
 
137  
-		for(; i+2<=numVerts; i+=2)
  137
+		for (; i+2<=numVerts; i+=2)
138 138
 		{
139 139
 			*Iptr++ = index + i - 1;
140 140
 			*Iptr++ = index + i + 0;
@@ -173,7 +173,7 @@ void IndexGenerator::AddIndices(int primitive, u32 numVerts)
173 173
 	u32 i = 3;
174 174
 	for (; i < numVerts; i+=4)
175 175
 	{
176  
-		if(pr)
  176
+		if (pr)
177 177
 		{
178 178
 			*Iptr++ = index + i - 2;
179 179
 			*Iptr++ = index + i - 1;
@@ -189,7 +189,7 @@ void IndexGenerator::AddIndices(int primitive, u32 numVerts)
189 189
 	}
190 190
 
191 191
 	// three vertices remaining, so render a triangle
192  
-	if(i == numVerts)
  192
+	if (i == numVerts)
193 193
 	{
194 194
 		Iptr = WriteTriangle<pr>(Iptr, index+numVerts-3, index+numVerts-2, index+numVerts-1);
195 195
 	}
6  Source/Core/VideoCommon/LightingShaderGen.h
@@ -207,7 +207,7 @@ static void GenerateLightingShader(T& object, LightingUidData& uid_data, int com
207 207
 			object.Write("lacc.w = 1.0;\n");
208 208
 		}
209 209
 
210  
-		if(color.enablelighting && alpha.enablelighting)
  210
+		if (color.enablelighting && alpha.enablelighting)
211 211
 		{
212 212
 			// both have lighting, test if they use the same lights
213 213
 			int mask = 0;
@@ -217,10 +217,10 @@ static void GenerateLightingShader(T& object, LightingUidData& uid_data, int com
217 217
 			uid_data.diffusefunc |= alpha.diffusefunc << (2*(j+2));
218 218
 			uid_data.light_mask |= color.GetFullLightMask() << (8*j);
219 219
 			uid_data.light_mask |= alpha.GetFullLightMask() << (8*(j+2));
220  
-			if(color.lightparams == alpha.lightparams)
  220
+			if (color.lightparams == alpha.lightparams)
221 221
 			{
222 222
 				mask = color.GetFullLightMask() & alpha.GetFullLightMask();
223  
-				if(mask)
  223
+				if (mask)
224 224
 				{
225 225
 					for (int i = 0; i < 8; ++i)
226 226
 					{
6  Source/Core/VideoCommon/MainBase.cpp
@@ -68,7 +68,7 @@ void VideoBackendHardware::Video_SetRendering(bool bEnabled)
68 68
 // Run from the graphics thread (from Fifo.cpp)
69 69
 void VideoFifo_CheckSwapRequest()
70 70
 {
71  
-	if(g_ActiveConfig.bUseXFB)
  71
+	if (g_ActiveConfig.bUseXFB)
72 72
 	{
73 73
 		if (Common::AtomicLoadAcquire(s_swapRequested))
74 74
 		{
@@ -84,7 +84,7 @@ void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight)
84 84
 {
85 85
 	if (g_ActiveConfig.bUseXFB)
86 86
 	{
87  
-		if(Common::AtomicLoadAcquire(s_swapRequested))
  87
+		if (Common::AtomicLoadAcquire(s_swapRequested))
88 88
 		{
89 89
 			u32 aLower = xfbAddr;
90 90
 			u32 aUpper = xfbAddr + 2 * fbWidth * fbHeight;
@@ -194,7 +194,7 @@ void VideoFifo_CheckPerfQueryRequest()
194 194
 
195 195
 u32 VideoBackendHardware::Video_GetQueryResult(PerfQueryType type)
196 196
 {
197  
-	if(!g_perf_query->ShouldEmulate())
  197
+	if (!g_perf_query->ShouldEmulate())
198 198
 	{
199 199
 		return 0;
200 200
 	}
2  Source/Core/VideoCommon/OnScreenDisplay.cpp
@@ -37,7 +37,7 @@ void AddMessage(const std::string& str, u32 ms)
37 37
 
38 38
 void DrawMessages()
39 39
 {
40  
-	if(!SConfig::GetInstance().m_LocalCoreStartupParameter.bOnScreenDisplayMessages)
  40
+	if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bOnScreenDisplayMessages)
41 41
 		return;
42 42
 
43 43
 	int left = 25, top = 15;
84  Source/Core/VideoCommon/PixelShaderGen.cpp
@@ -371,7 +371,7 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
371 371
 		for (unsigned int i = 0; i < numTexgen; ++i)
372 372
 			out.Write(",\n  in %s float3 uv%d : TEXCOORD%d", optCentroid, i, i);
373 373
 		out.Write(",\n  in %s float4 clipPos : TEXCOORD%d", optCentroid, numTexgen);
374  
-		if(g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
  374
+		if (g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
375 375
 			out.Write(",\n  in %s float4 Normal : TEXCOORD%d", optCentroid, numTexgen + 1);
376 376
 		out.Write("        ) {\n");
377 377
 	}
@@ -484,7 +484,7 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
484 484
 	RegisterStates[0].AlphaNeedOverflowControl = false;
485 485
 	RegisterStates[0].ColorNeedOverflowControl = false;
486 486
 	RegisterStates[0].AuxStored = false;
487  
-	for(int i = 1; i < 4; i++)
  487
+	for (int i = 1; i < 4; i++)
488 488
 	{
489 489
 		RegisterStates[i].AlphaNeedOverflowControl = true;
490 490
 		RegisterStates[i].ColorNeedOverflowControl = true;
@@ -515,13 +515,13 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
515 515
 	{
516 516
 		// The results of the last texenv stage are put onto the screen,
517 517
 		// regardless of the used destination register
518  
-		if(bpmem.combiners[numStages - 1].colorC.dest != 0)
  518
+		if (bpmem.combiners[numStages - 1].colorC.dest != 0)
519 519
 		{
520 520
 			bool retrieveFromAuxRegister = !RegisterStates[bpmem.combiners[numStages - 1].colorC.dest].ColorNeedOverflowControl && RegisterStates[bpmem.combiners[numStages - 1].colorC.dest].AuxStored;
521 521
 			out.Write("\tprev.rgb = %s%s;\n", retrieveFromAuxRegister ? "c" : "" , tevCOutputTable[bpmem.combiners[numStages - 1].colorC.dest]);
522 522
 			RegisterStates[0].ColorNeedOverflowControl = RegisterStates[bpmem.combiners[numStages - 1].colorC.dest].ColorNeedOverflowControl;
523 523
 		}
524  
-		if(bpmem.combiners[numStages - 1].alphaC.dest != 0)
  524
+		if (bpmem.combiners[numStages - 1].alphaC.dest != 0)
525 525
 		{
526 526
 			bool retrieveFromAuxRegister = !RegisterStates[bpmem.combiners[numStages - 1].alphaC.dest].AlphaNeedOverflowControl && RegisterStates[bpmem.combiners[numStages - 1].alphaC.dest].AuxStored;
527 527
 			out.Write("\tprev.a = %s%s;\n", retrieveFromAuxRegister ? "c" : "" , tevAOutputTable[bpmem.combiners[numStages - 1].alphaC.dest]);
@@ -529,7 +529,7 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
529 529
 		}
530 530
 	}
531 531
 	// emulation of unsigned 8 overflow when casting if needed
532  
-	if(RegisterStates[0].AlphaNeedOverflowControl || RegisterStates[0].ColorNeedOverflowControl)
  532
+	if (RegisterStates[0].AlphaNeedOverflowControl || RegisterStates[0].ColorNeedOverflowControl)
533 533
 		out.Write("\tprev = frac(prev * (255.0/256.0)) * (256.0/255.0);\n");
534 534
 
535 535
 	AlphaTest::TEST_RESULT Pretest = bpmem.alpha_test.TestResult();
@@ -766,12 +766,12 @@ static inline void WriteStage(T& out, pixel_shader_uid_data& uid_data, int n, AP
766 766
 	uid_data.stagehash[n].cc = cc.hex & 0xFFFFFF;
767 767
 	uid_data.stagehash[n].ac = ac.hex & 0xFFFFF0; // Storing rswap and tswap later
768 768
 
769  
-	if(cc.a == TEVCOLORARG_RASA || cc.a == TEVCOLORARG_RASC
770  
-		|| cc.b == TEVCOLORARG_RASA || cc.b == TEVCOLORARG_RASC
771  
-		|| cc.c == TEVCOLORARG_RASA || cc.c == TEVCOLORARG_RASC
772  
-		|| cc.d == TEVCOLORARG_RASA || cc.d == TEVCOLORARG_RASC
773  
-		|| ac.a == TEVALPHAARG_RASA || ac.b == TEVALPHAARG_RASA
774  
-		|| ac.c == TEVALPHAARG_RASA || ac.d == TEVALPHAARG_RASA)
  769
+	if (cc.a == TEVCOLORARG_RASA || cc.a == TEVCOLORARG_RASC ||
  770
+	   cc.b == TEVCOLORARG_RASA || cc.b == TEVCOLORARG_RASC ||
  771
+	   cc.c == TEVCOLORARG_RASA || cc.c == TEVCOLORARG_RASC ||
  772
+	   cc.d == TEVCOLORARG_RASA || cc.d == TEVCOLORARG_RASC ||
  773
+	   ac.a == TEVALPHAARG_RASA || ac.b == TEVALPHAARG_RASA ||
  774
+	   ac.c == TEVALPHAARG_RASA || ac.d == TEVALPHAARG_RASA)
775 775
 	{
776 776
 		const int i = bpmem.combiners[n].alphaC.rswap;
777 777
 		uid_data.stagehash[n].ac |= bpmem.combiners[n].alphaC.rswap;
@@ -792,7 +792,7 @@ static inline void WriteStage(T& out, pixel_shader_uid_data& uid_data, int n, AP
792 792
 		if (!bHasIndStage)
793 793
 		{
794 794
 			// calc tevcord
795  
-			if(bHasTexCoord)
  795
+			if (bHasTexCoord)
796 796
 				out.Write("tevcoord.xy = uv%d.xy;\n", texcoord);
797 797
 			else
798 798
 				out.Write("tevcoord.xy = float2(0.0, 0.0);\n");
@@ -820,15 +820,17 @@ static inline void WriteStage(T& out, pixel_shader_uid_data& uid_data, int n, AP
820 820
 	}
821 821
 
822 822
 
823  
-	if (cc.a == TEVCOLORARG_KONST || cc.b == TEVCOLORARG_KONST || cc.c == TEVCOLORARG_KONST || cc.d == TEVCOLORARG_KONST
824  
-		|| ac.a == TEVALPHAARG_KONST || ac.b == TEVALPHAARG_KONST || ac.c == TEVALPHAARG_KONST || ac.d == TEVALPHAARG_KONST)
  823
+	if (cc.a == TEVCOLORARG_KONST || cc.b == TEVCOLORARG_KONST ||
  824
+	    cc.c == TEVCOLORARG_KONST || cc.d == TEVCOLORARG_KONST ||
  825
+	    ac.a == TEVALPHAARG_KONST || ac.b == TEVALPHAARG_KONST ||
  826
+	    ac.c == TEVALPHAARG_KONST || ac.d == TEVALPHAARG_KONST)
825 827
 	{
826 828
 		int kc = bpmem.tevksel[n / 2].getKC(n & 1);
827 829
 		int ka = bpmem.tevksel[n / 2].getKA(n & 1);
828 830
 		uid_data.stagehash[n].tevksel_kc = kc;
829 831
 		uid_data.stagehash[n].tevksel_ka = ka;
830 832
 		out.Write("konsttemp = float4(%s, %s);\n", tevKSelTableC[kc], tevKSelTableA[ka]);
831  
-		if(kc > 7 || ka > 7)
  833
+		if (kc > 7 || ka > 7)
832 834
 		{
833 835
 			out.Write("ckonsttemp = frac(konsttemp * (255.0/256.0)) * (256.0/255.0);\n");
834 836
 		}
@@ -842,12 +844,13 @@ static inline void WriteStage(T& out, pixel_shader_uid_data& uid_data, int n, AP
842 844
 			out.SetConstantsUsed(C_KCOLORS+((ka-0xc)%4),C_KCOLORS+((ka-0xc)%4));
843 845
 	}
844 846
 
845  
-	if(cc.a == TEVCOLORARG_CPREV || cc.a == TEVCOLORARG_APREV
846  
-		|| cc.b == TEVCOLORARG_CPREV || cc.b == TEVCOLORARG_APREV
847  
-		|| cc.c == TEVCOLORARG_CPREV || cc.c == TEVCOLORARG_APREV
848  
-		|| ac.a == TEVALPHAARG_APREV || ac.b == TEVALPHAARG_APREV || ac.c == TEVALPHAARG_APREV)
  847
+	if (cc.a == TEVCOLORARG_CPREV || cc.a == TEVCOLORARG_APREV ||
  848
+	    cc.b == TEVCOLORARG_CPREV || cc.b == TEVCOLORARG_APREV ||
  849
+	    cc.c == TEVCOLORARG_CPREV || cc.c == TEVCOLORARG_APREV ||
  850
+	    ac.a == TEVALPHAARG_APREV || ac.b == TEVALPHAARG_APREV ||
  851
+	    ac.c == TEVALPHAARG_APREV)
849 852
 	{
850  
-		if(RegisterStates[0].AlphaNeedOverflowControl || RegisterStates[0].ColorNeedOverflowControl)
  853
+		if (RegisterStates[0].AlphaNeedOverflowControl || RegisterStates[0].ColorNeedOverflowControl)
851 854
 		{
852 855
 			out.Write("cprev = frac(prev * (255.0/256.0)) * (256.0/255.0);\n");
853 856
 			RegisterStates[0].AlphaNeedOverflowControl = false;
@@ -860,13 +863,14 @@ static inline void WriteStage(T& out, pixel_shader_uid_data& uid_data, int n, AP
860 863
 		RegisterStates[0].AuxStored = true;
861 864
 	}
862 865
 
863  
-	if(cc.a == TEVCOLORARG_C0 || cc.a == TEVCOLORARG_A0
864  
-	|| cc.b == TEVCOLORARG_C0 || cc.b == TEVCOLORARG_A0
865  
-	|| cc.c == TEVCOLORARG_C0 || cc.c == TEVCOLORARG_A0
866  
-	|| ac.a == TEVALPHAARG_A0 || ac.b == TEVALPHAARG_A0 || ac.c == TEVALPHAARG_A0)
  866
+	if (cc.a == TEVCOLORARG_C0 || cc.a == TEVCOLORARG_A0 ||
  867
+	    cc.b == TEVCOLORARG_C0 || cc.b == TEVCOLORARG_A0 ||
  868
+	    cc.c == TEVCOLORARG_C0 || cc.c == TEVCOLORARG_A0 ||
  869
+	    ac.a == TEVALPHAARG_A0 || ac.b == TEVALPHAARG_A0 ||
  870
+	    ac.c == TEVALPHAARG_A0)
867 871
 	{
868 872
 		out.SetConstantsUsed(C_COLORS+1,C_COLORS+1);
869  
-		if(RegisterStates[1].AlphaNeedOverflowControl || RegisterStates[1].ColorNeedOverflowControl)
  873
+		if (RegisterStates[1].AlphaNeedOverflowControl || RegisterStates[1].ColorNeedOverflowControl)
870 874
 		{
871 875
 			out.Write("cc0 = frac(c0 * (255.0/256.0)) * (256.0/255.0);\n");
872 876
 			RegisterStates[1].AlphaNeedOverflowControl = false;
@@ -879,13 +883,14 @@ static inline void WriteStage(T& out, pixel_shader_uid_data& uid_data, int n, AP
879 883
 		RegisterStates[1].AuxStored = true;
880 884
 	}
881 885
 
882  
-	if(cc.a == TEVCOLORARG_C1 || cc.a == TEVCOLORARG_A1
883  
-	|| cc.b == TEVCOLORARG_C1 || cc.b == TEVCOLORARG_A1
884  
-	|| cc.c == TEVCOLORARG_C1 || cc.c == TEVCOLORARG_A1
885  
-	|| ac.a == TEVALPHAARG_A1 || ac.b == TEVALPHAARG_A1 || ac.c == TEVALPHAARG_A1)
  886
+	if (cc.a == TEVCOLORARG_C1 || cc.a == TEVCOLORARG_A1 ||
  887
+	    cc.b == TEVCOLORARG_C1 || cc.b == TEVCOLORARG_A1 ||
  888
+	    cc.c == TEVCOLORARG_C1 || cc.c == TEVCOLORARG_A1 ||
  889
+	    ac.a == TEVALPHAARG_A1 || ac.b == TEVALPHAARG_A1 ||
  890
+	    ac.c == TEVALPHAARG_A1)
886 891
 	{
887 892
 		out.SetConstantsUsed(C_COLORS+2,C_COLORS+2);
888  
-		if(RegisterStates[2].AlphaNeedOverflowControl || RegisterStates[2].ColorNeedOverflowControl)
  893
+		if (RegisterStates[2].AlphaNeedOverflowControl || RegisterStates[2].ColorNeedOverflowControl)
889 894
 		{
890 895
 			out.Write("cc1 = frac(c1 * (255.0/256.0)) * (256.0/255.0);\n");
891 896
 			RegisterStates[2].AlphaNeedOverflowControl = false;
@@ -898,13 +903,14 @@ static inline void WriteStage(T& out, pixel_shader_uid_data& uid_data, int n, AP
898 903
 		RegisterStates[2].AuxStored = true;
899 904
 	}
900 905
 
901  
-	if(cc.a == TEVCOLORARG_C2 || cc.a == TEVCOLORARG_A2
902  
-	|| cc.b == TEVCOLORARG_C2 || cc.b == TEVCOLORARG_A2
903  
-	|| cc.c == TEVCOLORARG_C2 || cc.c == TEVCOLORARG_A2
904  
-	|| ac.a == TEVALPHAARG_A2 || ac.b == TEVALPHAARG_A2 || ac.c == TEVALPHAARG_A2)
  906
+	if (cc.a == TEVCOLORARG_C2 || cc.a == TEVCOLORARG_A2 ||
  907
+	    cc.b == TEVCOLORARG_C2 || cc.b == TEVCOLORARG_A2 ||
  908
+	    cc.c == TEVCOLORARG_C2 || cc.c == TEVCOLORARG_A2 ||
  909
+	    ac.a == TEVALPHAARG_A2 || ac.b == TEVALPHAARG_A2 ||
  910
+	    ac.c == TEVALPHAARG_A2)
905 911
 	{
906 912
 		out.SetConstantsUsed(C_COLORS+3,C_COLORS+3);
907  
-		if(RegisterStates[3].AlphaNeedOverflowControl || RegisterStates[3].ColorNeedOverflowControl)
  913
+		if (RegisterStates[3].AlphaNeedOverflowControl || RegisterStates[3].ColorNeedOverflowControl)
908 914
 		{
909 915
 			out.Write("cc2 = frac(c2 * (255.0/256.0)) * (256.0/255.0);\n");
910 916
 			RegisterStates[3].AlphaNeedOverflowControl = false;
@@ -948,7 +954,7 @@ static inline void WriteStage(T& out, pixel_shader_uid_data& uid_data, int n, AP
948 954
 		if (cc.shift > TEVSCALE_1)
949 955
 			out.Write("%s*(", tevScaleTable[cc.shift]);
950 956
 
951  
-		if(!(cc.d == TEVCOLORARG_ZERO && cc.op == TEVOP_ADD))
  957
+		if (!(cc.d == TEVCOLORARG_ZERO && cc.op == TEVOP_ADD))
952 958
 			out.Write("%s%s", tevCInputTable[cc.d], tevOpTable[cc.op]);
953 959
 
954 960
 		if (cc.a == cc.b)
@@ -997,7 +1003,7 @@ static inline void WriteStage(T& out, pixel_shader_uid_data& uid_data, int n, AP
997 1003
 		if (ac.shift > TEVSCALE_1)
998 1004
 			out.Write("%s*(", tevScaleTable[ac.shift]);
999 1005
 
1000  
-		if(!(ac.d == TEVALPHAARG_ZERO && ac.op == TEVOP_ADD))
  1006
+		if (!(ac.d == TEVALPHAARG_ZERO && ac.op == TEVOP_ADD))
1001 1007
 			out.Write("%s.a%s", tevAInputTable[ac.d], tevOpTable[ac.op]);
1002 1008
 
1003 1009
 		if (ac.a == ac.b)
@@ -1095,7 +1101,7 @@ static inline void WriteAlphaTest(T& out, pixel_shader_uid_data& uid_data, API_T
1095 1101
 	out.Write("\t\tocol0 = float4(0.0, 0.0, 0.0, 0.0);\n");
1096 1102
 	if (dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND)
1097 1103
 		out.Write("\t\tocol1 = float4(0.0, 0.0, 0.0, 0.0);\n");
1098  
-	if(per_pixel_depth)
  1104
+	if (per_pixel_depth)
1099 1105
 		out.Write("\t\tdepth = 1.0;\n");
1100 1106
 
1101 1107
 	// HAXX: zcomploc (aka early_ztest) is a way to control whether depth test is done before
@@ -1138,7 +1144,7 @@ static inline void WriteAlphaTest(T& out, pixel_shader_uid_data& uid_data, API_T
1138 1144
 static inline void WriteFog(T& out, pixel_shader_uid_data& uid_data)
1139 1145
 {
1140 1146
 	uid_data.fog_fsel = bpmem.fog.c_proj_fsel.fsel;
1141  
-	if(bpmem.fog.c_proj_fsel.fsel == 0)
  1147
+	if (bpmem.fog.c_proj_fsel.fsel == 0)
1142 1148
 		return; // no Fog
1143 1149
 
1144 1150
 	uid_data.fog_proj = bpmem.fog.c_proj_fsel.proj;
10  Source/Core/VideoCommon/PixelShaderManager.cpp
@@ -72,7 +72,7 @@ void PixelShaderManager::SetConstants()
72 72
 	{
73 73
 		// set by two components, so keep changed flag here
74 74
 		// TODO: try to split both registers and move this logic to the shader
75  
-		if(!g_ActiveConfig.bDisableFog && bpmem.fogRange.Base.Enabled == 1)
  75
+		if (!g_ActiveConfig.bDisableFog && bpmem.fogRange.Base.Enabled == 1)
76 76
 		{
77 77
 			//bpmem.fogRange.Base.Center : center of the viewport in x axis. observation: bpmem.fogRange.Base.Center = realcenter + 342;
78 78
 			int center = ((u32)bpmem.fogRange.Base.Center) - 342;
@@ -137,7 +137,7 @@ void PixelShaderManager::SetConstants()
137 137
 		}
138 138
 	}
139 139
 
140  
-	if(s_bViewPortChanged)
  140
+	if (s_bViewPortChanged)
141 141
 	{
142 142
 		constants.zbias[1][0] = xfregs.viewport.farZ / 16777216.0f;
143 143
 		constants.zbias[1][1] = xfregs.viewport.zRange / 16777216.0f;
@@ -179,7 +179,7 @@ void PixelShaderManager::SetTexDims(int texmapid, u32 width, u32 height, u32 wra
179 179
 {
180 180
 	// TODO: move this check out to callee. There we could just call this function on texture changes
181 181
 	// or better, use textureSize() in glsl
182  
-	if(constants.texdims[texmapid][0] != 1.0f/width || constants.texdims[texmapid][1] != 1.0f/height)
  182
+	if (constants.texdims[texmapid][0] != 1.0f/width || constants.texdims[texmapid][1] != 1.0f/height)
183 183
 		dirty = true;
184 184
 
185 185
 	constants.texdims[texmapid][0] = 1.0f/width;
@@ -280,7 +280,7 @@ void PixelShaderManager::SetFogColorChanged()
280 280
 
281 281
 void PixelShaderManager::SetFogParamChanged()
282 282
 {
283  
-	if(!g_ActiveConfig.bDisableFog)
  283
+	if (!g_ActiveConfig.bDisableFog)
284 284
 	{
285 285
 		constants.fog[1][0] = bpmem.fog.a.GetA();
286 286
 		constants.fog[1][1] = (float)bpmem.fog.b_magnitude / 0xFFFFFF;
@@ -324,7 +324,7 @@ void PixelShaderManager::InvalidateXFRange(int start, int end)
324 324
 
325 325
 void PixelShaderManager::SetMaterialColorChanged(int index, u32 color)
326 326
 {
327  
-	if(g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
  327
+	if (g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
328 328
 	{
329 329
 		constants.pmaterials[index][0] = ((color >> 24) & 0xFF) / 255.0f;
330 330
 		constants.pmaterials[index][1] = ((color >> 16) & 0xFF) / 255.0f;
2  Source/Core/VideoCommon/RenderBase.cpp
@@ -288,7 +288,7 @@ void Renderer::DrawDebugText()
288 288
 	}
289 289
 
290 290
 	const char* ar_text = "";
291  
-	switch(g_ActiveConfig.iAspectRatio)
  291
+	switch (g_ActiveConfig.iAspectRatio)
292 292
 	{
293 293
 	case ASPECT_AUTO:
294 294
 		ar_text = "Auto";
34  Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -46,7 +46,7 @@ enum
46 46
 
47 47
 	TexDecoder_SetTexFmtOverlayOptions(g_ActiveConfig.bTexFmtOverlayEnable, g_ActiveConfig.bTexFmtOverlayCenter);
48 48
 
49  
-	if(g_ActiveConfig.bHiresTextures && !g_ActiveConfig.bDumpTextures)
  49
+	if (g_ActiveConfig.bHiresTextures && !g_ActiveConfig.bDumpTextures)
50 50
 		HiresTextures::Init(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str());
51 51
 
52 52
 	SetHash64Function(g_ActiveConfig.bHiresTextures || g_ActiveConfig.bDumpTextures);
@@ -88,7 +88,7 @@ void TextureCache::OnConfigChanged(VideoConfig& config)
88 88
 		{
89 89
 			g_texture_cache->Invalidate();
90 90
 
91  
-			if(g_ActiveConfig.bHiresTextures)
  91
+			if (g_ActiveConfig.bHiresTextures)
92 92
 				HiresTextures::Init(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str());
93 93
 
94 94
 			SetHash64Function(g_ActiveConfig.bHiresTextures || g_ActiveConfig.bDumpTextures);
@@ -125,10 +125,9 @@ void TextureCache::Cleanup()
125 125
 	TexCache::iterator tcend = textures.end();
126 126
 	while (iter != tcend)
127 127
 	{
128  
-		if (frameCount > TEXTURE_KILL_THRESHOLD + iter->second->frameCount
129  
-
130  
-			// EFB copies living on the host GPU are unrecoverable and thus shouldn't be deleted
131  
-			&& ! iter->second->IsEfbCopy() )
  128
+		if (frameCount > TEXTURE_KILL_THRESHOLD + iter->second->frameCount &&
  129
+            // EFB copies living on the host GPU are unrecoverable and thus shouldn't be deleted
  130
+		    !iter->second->IsEfbCopy())
132 131
 		{
133 132
 			delete iter->second;
134 133
 			textures.erase(iter++);
@@ -421,9 +420,14 @@ static TextureCache::TCacheEntryBase* ReturnEntry(unsigned int stage, TextureCac
421 420
 		//
422 421
 		// TODO: Don't we need to force texture decoding to RGBA8 for dynamic EFB copies?
423 422
 		// TODO: Actually, it should be enough if the internal texture format matches...
424  
-		if ((entry->type == TCET_NORMAL && width == entry->virtual_width && height == entry->virtual_height
425  
-			&& full_format == entry->format && entry->num_mipmaps > maxlevel)
426  
-			|| (entry->type == TCET_EC_DYNAMIC && entry->native_width == width && entry->native_height == height))
  423
+		if ((entry->type == TCET_NORMAL &&
  424
+			 width == entry->virtual_width &&
  425
+			 height == entry->virtual_height &&
  426
+		     full_format == entry->format &&
  427
+		     entry->num_mipmaps > maxlevel) ||
  428
+		    (entry->type == TCET_EC_DYNAMIC &&
  429
+		     entry->native_width == width &&
  430
+		     entry->native_height == height))
427 431
 		{
428 432
 			// reuse the texture
429 433
 		}
@@ -449,7 +453,7 @@ static TextureCache::TCacheEntryBase* ReturnEntry(unsigned int stage, TextureCac
449 453
 				expandedHeight = height;
450 454
 
451 455
 				// If we thought we could reuse the texture before, make sure to pool it now!
452  
-				if(entry)
  456
+				if (entry)
453 457
 				{
454 458
 					delete entry;
455 459
 					entry = nullptr;
@@ -750,7 +754,7 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
750 754
 			ColorMask[4] = ColorMask[7] = 1.0f / 15.0f;
751 755
 			
752 756
 			cbufid = 16;
753  
-			if(!efbHasAlpha) {
  757
+			if (!efbHasAlpha) {
754 758
 				ColorMask[3] = 0.0f;
755 759
 				fConstAdd[3] = 1.0f;
756 760
 				cbufid = 17;
@@ -760,7 +764,7 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
760 764
 			colmat[0] = colmat[4] = colmat[8] = colmat[15] = 1.0f;
761 765
 			
762 766
 			cbufid = 18;
763  
-			if(!efbHasAlpha) {
  767
+			if (!efbHasAlpha) {
764 768
 				ColorMask[3] = 0.0f;
765 769
 				fConstAdd[3] = 1.0f;
766 770
 				cbufid = 19;
@@ -771,7 +775,7 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
771 775
 			colmat[3] = colmat[7] = colmat[11] = colmat[15] = 1.0f;
772 776
 			
773 777
 			cbufid = 20;
774  
-			if(!efbHasAlpha) {
  778
+			if (!efbHasAlpha) {
775 779
 				ColorMask[3] = 0.0f;
776 780
 				fConstAdd[0] = 1.0f;
777 781
 				fConstAdd[1] = 1.0f;
@@ -818,7 +822,7 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
818 822
 			ColorMask[7] = 1.0f / 7.0f;
819 823
 			
820 824
 			cbufid = 27;
821  
-			if(!efbHasAlpha) {
  825
+			if (!efbHasAlpha) {
822 826
 				ColorMask[3] = 0.0f;
823 827
 				fConstAdd[3] = 1.0f;
824 828
 				cbufid = 28;
@@ -828,7 +832,7 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
828 832
 			colmat[0] = colmat[5] = colmat[10] = colmat[15] = 1.0f;
829 833
 			
830 834
 			cbufid = 29;
831  
-			if(!efbHasAlpha) {
  835
+			if (!efbHasAlpha) {
832 836
 				ColorMask[3] = 0.0f;
833 837
 				fConstAdd[3] = 1.0f;
834 838
 				cbufid = 30;
2  Source/Core/VideoCommon/TextureConversionShader.cpp
@@ -584,7 +584,7 @@ void WriteZ24Encoder(char*& p, API_TYPE ApiType)
584 584
 		WRITE(p, "  expanded%i.b = depth%i;\n", i, i);
585 585
 	}
586 586
 
587  
-	WRITE(p, "  if(!first) {\n");
  587
+	WRITE(p, "  if (!first) {\n");
588 588
 	// upper 16
589 589
 	WRITE(p, "     ocol0.b = expanded0.g / 255.0;\n");
590 590
 	WRITE(p, "     ocol0.g = expanded0.b / 255.0;\n");
12  Source/Core/VideoCommon/TextureDecoder_Generic.cpp
@@ -728,7 +728,7 @@ PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int heigh
728 728
 					{
729 729
 						u16 *ptr = (u16 *)dst + (y + iy) * width + x;
730 730
 						u16 *s = (u16 *)(src + 8 * xStep);
731  
-						for(int j = 0; j < 4; j++)
  731
+						for (int j = 0; j < 4; j++)
732 732
 							*ptr++ = Common::swap16(*s++);
733 733
 					}
734 734
 		}
@@ -758,7 +758,7 @@ PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int heigh
758 758
 					{
759 759
 						u16 *ptr = (u16 *)dst + (y + iy) * width + x;
760 760
 						u16 *s = (u16 *)(src + 8 * xStep);
761  
-						for(int j = 0; j < 4; j++)
  761
+						for (int j = 0; j < 4; j++)
762 762
 							*ptr++ = Common::swap16(*s++);
763 763
 					}
764 764
 		}
@@ -857,7 +857,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
857 857
 					for (int iy = 0, xStep =  8 * yStep; iy < 8; iy++,xStep++)
858 858
 						decodebytesC4_5A3_To_rgba32(dst + (y + iy) * width + x, src + 4 * xStep, tlutaddr);
859 859
 		}
860  
-		else if(tlutfmt == 0)
  860
+		else if (tlutfmt == 0)
861 861
 		{
862 862
 			for (int y = 0; y < height; y += 8)
863 863
 				for (int x = 0, yStep = (y / 8) * Wsteps8; x < width; x += 8,yStep++)
@@ -919,7 +919,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
919 919
 					for (int iy = 0, xStep = 4 * yStep; iy < 4; iy++, xStep++)
920 920
 						decodebytesC8_5A3_To_RGBA32((u32*)dst + (y + iy) * width + x, src + 8 * xStep, tlutaddr);
921 921
 		}
922  
-		else if(tlutfmt == 0)
  922
+		else if (tlutfmt == 0)
923 923
 		{
924 924
 			for (int y = 0; y < height; y += 4)
925 925
 				for (int x = 0, yStep = (y / 4) * Wsteps8; x < width; x += 8, yStep++)
@@ -992,7 +992,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
992 992
 					{
993 993
 						u32 *ptr = dst + (y + iy) * width + x;
994 994
 						u16 *s = (u16 *)src;
995  
-						for(int j = 0; j < 4; j++)
  995
+						for (int j = 0; j < 4; j++)
996 996
 							*ptr++ = decode565RGBA(Common::swap16(*s++));
997 997
 					}
998 998
 		}
@@ -1093,7 +1093,7 @@ PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, in
1093 1093
 		{
1094 1094
 			for (int x=0; x < xcnt; x++)
1095 1095
 			{
1096  
-				switch(retval)
  1096
+				switch (retval)
1097 1097
 				{
1098 1098
 				case PC_TEX_FMT_I8:
1099 1099
 					{
10  Source/Core/VideoCommon/TextureDecoder_x64.cpp
@@ -791,7 +791,7 @@ PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int heigh
791 791
 					{
792 792
 						u16 *ptr = (u16 *)dst + (y + iy) * width + x;
793 793
 						u16 *s = (u16 *)(src + 8 * xStep);
794  
-						for(int j = 0; j < 4; j++)
  794
+						for (int j = 0; j < 4; j++)
795 795
 							*ptr++ = Common::swap16(*s++);
796 796
 					}
797 797
 
@@ -825,7 +825,7 @@ PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int heigh
825 825
 					{
826 826
 						u16 *ptr = (u16 *)dst + (y + iy) * width + x;
827 827
 						u16 *s = (u16 *)(src + 8 * xStep);
828  
-						for(int j = 0; j < 4; j++)
  828
+						for (int j = 0; j < 4; j++)
829 829
 							*ptr++ = Common::swap16(*s++);
830 830
 					}
831 831
 		}
@@ -974,7 +974,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
974 974
 					for (int iy = 0, xStep =  8 * yStep; iy < 8; iy++,xStep++)
975 975
 						decodebytesC4_5A3_To_rgba32(dst + (y + iy) * width + x, src + 4 * xStep, tlutaddr);
976 976
 		}
977  
-		else if(tlutfmt == 0)
  977
+		else if (tlutfmt == 0)
978 978
 		{
979 979
 			#pragma omp parallel for
980 980
 			for (int y = 0; y < height; y += 8)
@@ -1229,7 +1229,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
1229 1229
 					for (int iy = 0, xStep = 4 * yStep; iy < 4; iy++, xStep++)
1230 1230
 						decodebytesC8_5A3_To_RGBA32((u32*)dst + (y + iy) * width + x, src + 8 * xStep, tlutaddr);
1231 1231
 		}
1232  
-		else if(tlutfmt == 0)
  1232
+		else if (tlutfmt == 0)
1233 1233
 		{
1234 1234
 			#pragma omp parallel for
1235 1235
 			for (int y = 0; y < height; y += 4)
@@ -2068,7 +2068,7 @@ PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, in
2068 2068
 		{
2069 2069
 			for (int x=0; x < xcnt; x++)
2070 2070
 			{
2071  
-				switch(retval)
  2071
+				switch (retval)
2072 2072
 				{
2073 2073
 				case PC_TEX_FMT_I8:
2074 2074
 					{
4  Source/Core/VideoCommon/VertexLoader.cpp
@@ -567,7 +567,7 @@ void VertexLoader::CompileVertexTranslator()
567 567
 	if (m_VtxDesc.Tex7MatIdx) {m_VertexSize += 1; components |= VB_HAS_TEXMTXIDX7; WriteCall(TexMtx_ReadDirect_UByte); }
568 568
 
569 569
 	// Write vertex position loader
570  
-	if(g_ActiveConfig.bUseBBox)
  570
+	if (g_ActiveConfig.bUseBBox)
571 571
 	{
572 572
 		WriteCall(UpdateBoundingBoxPrepare);
573 573
 		WriteCall(VertexLoader_Position::GetFunction(m_VtxDesc.Position, m_VtxAttr.PosFormat, m_VtxAttr.PosElements));
@@ -947,7 +947,7 @@ void VertexLoader::SetVAT(u32 _group0, u32 _group1, u32 _group2)
947 947
 	m_VtxAttr.texCoord[7].Format   = vat.g2.Tex7CoordFormat;
948 948
 	m_VtxAttr.texCoord[7].Frac     = vat.g2.Tex7Frac;
949 949
 
950  
-	if(!m_VtxAttr.ByteDequant) {
  950
+	if (!m_VtxAttr.ByteDequant) {
951 951
 		ERROR_LOG(VIDEO, "ByteDequant is set to zero");
952 952
 	}
953 953
 };
16  Source/Core/VideoCommon/VertexManagerBase.cpp
@@ -66,7 +66,7 @@ void VertexManager::PrepareForAdditionalData(int primitive, u32 count, u32 strid
66 66
 	{
67 67
 		Flush();
68 68
 
69  
-		if(count > IndexGenerator::GetRemainingIndices())
  69
+		if (count > IndexGenerator::GetRemainingIndices())
70 70
 			ERROR_LOG(VIDEO, "Too little remaining index values. Use 32-bit or reset them on flush.");
71 71
 		if (count > GetRemainingIndices(primitive))
72 72
 			ERROR_LOG(VIDEO, "VertexManager: Buffer not large enough for all indices! "
@@ -77,7 +77,7 @@ void VertexManager::PrepareForAdditionalData(int primitive, u32 count, u32 strid
77 77
 	}
78 78
 
79 79
 	// need to alloc new buffer
80  
-	if(IsFlushed)
  80
+	if (IsFlushed)
81 81
 	{
82 82
 		g_vertex_manager->ResetBuffer(stride);
83 83
 		IsFlushed = false;
@@ -88,7 +88,7 @@ u32 VertexManager::GetRemainingIndices(int primitive)
88 88
 {
89 89
 	u32 index_len = MAXIBUFFERSIZE - IndexGenerator::GetIndexLen();
90 90
 
91  
-	if(g_Config.backend_info.bSupportsPrimitiveRestart)
  91
+	if (g_Config.backend_info.bSupportsPrimitiveRestart)
92 92
 	{
93 93
 		switch (primitive)
94 94
 		{
@@ -216,13 +216,15 @@ void VertexManager::Flush()
216 216
 	VertexShaderManager::SetConstants();
217 217
 	PixelShaderManager::SetConstants();
218 218
 
219  
-	bool useDstAlpha = !g_ActiveConfig.bDstAlphaPass && bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate
220  
-		&& bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24;
  219
+	bool useDstAlpha = !g_ActiveConfig.bDstAlphaPass &&
  220
+	                   bpmem.dstalpha.enable &&
  221
+	                   bpmem.blendmode.alphaupdate &&
  222
+	                   bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24;
221 223
 
222  
-	if(PerfQueryBase::ShouldEmulate())
  224
+	if (PerfQueryBase::ShouldEmulate())
223 225
 		g_perf_query->EnableQuery(bpmem.zcontrol.early_ztest ? PQG_ZCOMP_ZCOMPLOC : PQG_ZCOMP);
224 226
 	g_vertex_manager->vFlush(useDstAlpha);
225  
-	if(PerfQueryBase::ShouldEmulate())
  227
+	if (PerfQueryBase::ShouldEmulate())
226 228
 		g_perf_query->DisableQuery(bpmem.zcontrol.early_ztest ? PQG_ZCOMP_ZCOMPLOC : PQG_ZCOMP);
227 229
 
228 230
 	GFX_DEBUGGER_PAUSE_AT(NEXT_FLUSH, true);
10  Source/Core/VideoCommon/VertexShaderGen.cpp
@@ -49,7 +49,7 @@ static inline void GenerateVSOutputStruct(T& object, API_TYPE api_type)
49 49
 
50 50
 	DefineVSOutputStructMember(object, api_type, "float4", "clipPos", -1, "TEXCOORD", xfregs.numTexGen.numTexGens);
51 51
 
52  
-	if(g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
  52
+	if (g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
53 53
 		DefineVSOutputStructMember(object, api_type, "float4", "Normal", -1, "TEXCOORD", xfregs.numTexGen.numTexGens + 1);
54 54
 
55 55
 	object.Write("};\n");
@@ -104,7 +104,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
104 104
 	uid_data.components = components;
105 105
 	uid_data.pixel_lighting = (g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting);
106 106
 
107  
-	if(api_type == API_OPENGL)
  107
+	if (api_type == API_OPENGL)
108 108
 	{
109 109
 		out.Write("in float4 rawpos; // ATTR%d,\n", SHADER_POSITION_ATTRIB);
110 110
 		if (components & VB_HAS_POSMTXIDX)
@@ -384,7 +384,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
384 384
 	// clipPos/w needs to be done in pixel shader, not here
385 385
 	out.Write("o.clipPos = float4(pos.x,pos.y,o.pos.z,o.pos.w);\n");
386 386
 
387  
-	if(g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
  387
+	if (g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
388 388
 	{
389 389
 		out.Write("o.Normal = float4(_norm0.x,_norm0.y,_norm0.z,pos.z);\n");
390 390
 
@@ -418,7 +418,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
418 418
 		//seems to get rather complicated
419 419
 	}
420 420
 
421  
-	if(api_type == API_OPENGL)
  421
+	if (api_type == API_OPENGL)
422 422
 	{
423 423
 		// Bit ugly here
424 424
 		// TODO: Make pretty
@@ -428,7 +428,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
428 428
 		for (unsigned int i = 0; i < xfregs.numTexGen.numTexGens; ++i)
429 429
 			out.Write(" uv%d_2.xyz =  o.tex%d;\n", i, i);
430 430
 		out.Write("  clipPos_2 = o.clipPos;\n");
431  
-		if(g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
  431
+		if (g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
432 432
 			out.Write("  Normal_2 = o.Normal;\n");
433 433
 
434 434
 		out.Write("colors_02 = o.colors_0;\n");
6  Source/Core/VideoCommon/VertexShaderManager.cpp
@@ -233,7 +233,7 @@ void VertexShaderManager::SetConstants()
233 233
 	{
234 234
 		int startn = nNormalMatricesChanged[0] / 3;
235 235
 		int endn = (nNormalMatricesChanged[1] + 2) / 3;
236  
-		for(int i=startn; i<endn; i++)
  236
+		for (int i=startn; i<endn; i++)
237 237
 		{
238 238
 			memcpy(constants.normalmatrices[i], &xfmem[XFMEM_NORMALMATRICES + 3*i], 12);
239 239
 		}
@@ -372,7 +372,7 @@ void VertexShaderManager::SetConstants()
372 372
 		g_renderer->SetViewport();
373 373
 		
374 374
 		// Update projection if the viewport isn't 1:1 useable
375  
-		if(!g_ActiveConfig.backend_info.bSupportsOversizedViewports)
  375
+		if (!g_ActiveConfig.backend_info.bSupportsOversizedViewports)
376 376
 		{
377 377
 			ViewportCorrectionMatrix(s_viewportCorrection);
378 378
 			bProjectionChanged = true;
@@ -385,7 +385,7 @@ void VertexShaderManager::SetConstants()
385 385
 
386 386
 		float *rawProjection = xfregs.projection.rawProjection;
387 387
 
388  
-		switch(xfregs.projection.type)
  388
+		switch (xfregs.projection.type)
389 389
 		{
390 390
 		case GX_PERSPECTIVE:
391 391
 
2  Source/DSPSpy/main_spy.cpp
@@ -682,7 +682,7 @@ int main()
682 682
 #endif
683 683
 		{
684 684
 			curUcode++;
685  
-			if(curUcode == NUM_UCODES)
  685
+			if (curUcode == NUM_UCODES)
686 686
 				curUcode = 0;
687 687
 
688 688
 			// Reset step counters since we're in a new ucode.
12  Source/DSPTool/DSPTool.cpp
@@ -201,7 +201,7 @@ void RunAsmTests()
201 201
 // So far, all this binary can do is test partially that itself works correctly.
202 202
 int main(int argc, const char *argv[])
203 203
 {
204  
-	if(argc == 1 || (argc == 2 && (!strcmp(argv[1], "--help") || (!strcmp(argv[1], "-?")))))
  204
+	if (argc == 1 || (argc == 2 && (!strcmp(argv[1], "--help") || (!strcmp(argv[1], "-?")))))
205 205
 	{
206 206
 		printf("USAGE: DSPTool [-?] [--help] [-f] [-d] [-m] [-p <FILE>] [-o <FILE>] [-h <FILE>] <DSP ASSEMBLER FILE>\n");
207 207
 		printf("-? / --help: Prints this message\n");
@@ -278,7 +278,7 @@ int main(int argc, const char *argv[])
278 278
 		}
279 279
 	}
280 280
 
281  
-	if(multiple && (compare || disassemble || !output_name.empty() ||
  281
+	if (multiple && (compare || disassemble || !output_name.empty() ||
282 282
 					input_name.empty())) {
283 283
 		printf("ERROR: Multiple files can only be used with assembly "
284 284
 			"and must compile a header file.\n");
@@ -398,7 +398,7 @@ int main(int argc, const char *argv[])
398 398
 		std::string source;
399 399
 		if (File::ReadFileToString(input_name.c_str(), source))
400 400
 		{
401  
-			if(multiple)
  401
+			if (multiple)
402 402
 			{
403 403
 				// When specifying a list of files we must compile a header
404 404
 				// (we can't assemble multiple files to one binary)
@@ -411,17 +411,17 @@ int main(int argc, const char *argv[])
411 411
 
412 412
 				source.append("\n");
413 413
 
414  
-				while((pos = source.find('\n', lastPos)) != std::string::npos)
  414
+				while ((pos = source.find('\n', lastPos)) != std::string::npos)
415 415
 				{
416 416
 					std::string temp = source.substr(lastPos, pos - lastPos);
417  
-					if(!temp.empty())
  417
+					if (!temp.empty())
418 418
 						files.push_back(temp);
419 419
 					lastPos = pos + 1;
420 420
 				}
421 421
 
422 422
 				lines = (int)files.size();
423 423
 
424  
-				if(lines == 0)
  424
+				if (lines == 0)
425 425
 				{
426 426
 					printf("ERROR: Must specify at least one file\n");
427 427
 					return 1;

0 notes on commit ede4655

Please sign in to comment.
Something went wrong with that request. Please try again.