Skip to content

Commit 49100b3

Browse files
authored
Merge pull request #6335 from wargoblin/codex/format-initializers-and-update-spacing
Fix spacing after commas in Windows source files
2 parents 185fb4f + 40be685 commit 49100b3

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

api/graphics2_win.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void SetupPixelFormat(HDC dc) {
111111
}
112112

113113
static void make_window(const char* title) {
114-
RECT WindowRect = {0,0,0,0};
114+
RECT WindowRect = {0, 0, 0, 0};
115115
int width, height;
116116
DWORD dwExStyle;
117117
DWORD dwStyle;
@@ -163,7 +163,7 @@ static void make_window(const char* title) {
163163

164164
window = CreateWindowEx(dwExStyle, BOINC_WINDOW_CLASS_NAME, window_title,
165165
dwStyle|WS_CLIPSIBLINGS|WS_CLIPCHILDREN, WindowRect.left, WindowRect.top,
166-
WindowRect.right-WindowRect.left,WindowRect.bottom-WindowRect.top,
166+
WindowRect.right-WindowRect.left, WindowRect.bottom-WindowRect.top,
167167
NULL, NULL, instance, NULL
168168
);
169169

@@ -436,7 +436,7 @@ void boinc_graphics_loop(int argc, char** argv, const char* title) {
436436
//
437437
reg_win_class();
438438

439-
wglMakeCurrent(NULL,NULL);
439+
wglMakeCurrent(NULL, NULL);
440440
make_window(title);
441441

442442
// Create a timer thread to do rendering
@@ -466,7 +466,7 @@ extern int main(int, char**);
466466
//
467467
void boinc_set_windows_icon(const char* icon16, const char* icon48) {
468468
LONGLONG ic;
469-
HWND hWnd = FindWindow("BOINC_app",NULL);
469+
HWND hWnd = FindWindow("BOINC_app", NULL);
470470

471471
if ((ic = (LONGLONG)LoadIcon(instance, icon48)) != 0) {
472472
#ifdef _WIN64

api/windows_opengl.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ HANDLE graphics_threadh;
5454

5555
void KillWindow() {
5656
window_ready=false;
57-
wglMakeCurrent(NULL,NULL); // release GL rendering context
57+
wglMakeCurrent(NULL, NULL); // release GL rendering context
5858
if (hRC) {
5959
wglDeleteContext(hRC);
6060
hRC=NULL;
6161
}
6262

6363
if (hWnd && hDC) {
64-
ReleaseDC(hWnd,hDC);
64+
ReleaseDC(hWnd, hDC);
6565
}
6666
hDC = NULL;
6767

@@ -115,7 +115,7 @@ void SetupPixelFormat(HDC hDC) {
115115
}
116116

117117
static void make_new_window() {
118-
RECT WindowRect = {0,0,0,0};
118+
RECT WindowRect = {0, 0, 0, 0};
119119
int width, height;
120120
DWORD dwExStyle;
121121
DWORD dwStyle;
@@ -145,7 +145,7 @@ static void make_new_window() {
145145
get_window_title(aid, window_title, 256);
146146
hWnd = CreateWindowEx(dwExStyle, BOINC_WINDOW_CLASS_NAME, window_title,
147147
dwStyle|WS_CLIPSIBLINGS|WS_CLIPCHILDREN, WindowRect.left, WindowRect.top,
148-
WindowRect.right-WindowRect.left,WindowRect.bottom-WindowRect.top,
148+
WindowRect.right-WindowRect.left, WindowRect.bottom-WindowRect.top,
149149
NULL, NULL, hInstance, NULL
150150
);
151151

@@ -413,7 +413,7 @@ LRESULT CALLBACK WndProc(
413413
}
414414

415415
// Pass All Unhandled Messages To DefWindowProc
416-
return DefWindowProc(hWnd,uMsg,wParam,lParam);
416+
return DefWindowProc(hWnd, uMsg, wParam, lParam);
417417
}
418418

419419
BOOL reg_win_class() {
@@ -434,16 +434,16 @@ BOOL reg_win_class() {
434434

435435
// Attempt To Register The Window Class
436436
if (!RegisterClass(&wc)) {
437-
MessageBox(NULL,"Failed To Register The Window Class.","ERROR",MB_OK|MB_ICONEXCLAMATION);
437+
MessageBox(NULL, "Failed To Register The Window Class.", "ERROR", MB_OK|MB_ICONEXCLAMATION);
438438
return FALSE; // Return FALSE
439439
}
440440

441441
return TRUE;
442442
}
443443

444444
BOOL unreg_win_class() {
445-
if (!UnregisterClass(BOINC_WINDOW_CLASS_NAME,hInstance)) {
446-
MessageBox(NULL,"Could Not Unregister Class.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
445+
if (!UnregisterClass(BOINC_WINDOW_CLASS_NAME, hInstance)) {
446+
MessageBox(NULL, "Could Not Unregister Class.", "SHUTDOWN ERROR", MB_OK | MB_ICONINFORMATION);
447447
hInstance=NULL; // Set hInstance To NULL
448448
}
449449

@@ -527,7 +527,7 @@ void win_graphics_event_loop() {
527527
set_mode(MODE_HIDE_GRAPHICS);
528528
}
529529
while (1) {
530-
if (GetMessage(&msg,NULL,0,0)) {
530+
if (GetMessage(&msg, NULL, 0, 0)) {
531531
TranslateMessage(&msg);
532532
DispatchMessage(&msg);
533533
} else {

client/hostinfo_win.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static void __cpuid(unsigned int cpuinfo[4], unsigned int type) {
291291
#elif defined(_M_AMD64)
292292
// damn Microsoft for not having inline assembler in 64-bit code
293293
// so this is in an NASM compiled library
294-
asm_cpuid(cpuinfo,type);
294+
asm_cpuid(cpuinfo, type);
295295
#endif
296296
#endif
297297
}
@@ -1043,7 +1043,7 @@ int get_cpuid(unsigned int info_type, unsigned int& a, unsigned int& b, unsigned
10431043

10441044

10451045
int retval = 1;
1046-
int CPUInfo[4] = {0,0,0,0};
1046+
int CPUInfo[4] = {0, 0, 0, 0};
10471047
#ifdef _MSC_VER
10481048
__try {
10491049
#endif
@@ -1240,7 +1240,7 @@ bool is_avx_supported() {
12401240
//
12411241
// Note that XGETBV is only available on 686 or later CPUs, so
12421242
// the instruction needs to be conditionally run.
1243-
unsigned int a,b,c,d;
1243+
unsigned int a, b, c, d;
12441244
get_cpuid(1, a, b, c, d);
12451245

12461246
bool osUsesXSAVE_XRSTORE = c & (1 << 27) || false;

samples/gfx_html/browserctrl_win.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ HWND CHTMLBrowserHost::Create(
106106
return NULL;
107107

108108
// Allocate the thunk structure here, where we can fail gracefully.
109-
BOOL result = m_thunk.Init(NULL,NULL);
109+
BOOL result = m_thunk.Init(NULL, NULL);
110110
if (result == FALSE)
111111
{
112112
SetLastError(ERROR_OUTOFMEMORY);

0 commit comments

Comments
 (0)