From 7f864d563c0b6f6961a99c0f4dd9e1a47cec3f4c Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 18 Aug 2018 16:05:33 +0300 Subject: [PATCH] - cleaned up inconsistent leading whitespaces Bump copyright year as well --- src/posix/cocoa/i_main.mm | 20 ++++++------- src/posix/cocoa/i_system.mm | 60 ++++++++++++++++++------------------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/posix/cocoa/i_main.mm b/src/posix/cocoa/i_main.mm index d4413c9bd..dc94fbc5b 100644 --- a/src/posix/cocoa/i_main.mm +++ b/src/posix/cocoa/i_main.mm @@ -2,7 +2,7 @@ ** i_main.mm ** **--------------------------------------------------------------------------- - ** Copyright 2012-2015 Alexey Lysiuk + ** Copyright 2012-2018 Alexey Lysiuk ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without @@ -393,23 +393,23 @@ extern bool AppActive; NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - while (true) - { - NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask + while (true) + { + NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate dateWithTimeIntervalSinceNow:0] inMode:NSDefaultRunLoopMode dequeue:YES]; - if (nil == event) - { - break; - } + if (nil == event) + { + break; + } I_ProcessEvent(event); [NSApp sendEvent:event]; } - - [NSApp updateWindows]; + + [NSApp updateWindows]; [pool release]; } diff --git a/src/posix/cocoa/i_system.mm b/src/posix/cocoa/i_system.mm index c8f066be5..617912d2c 100644 --- a/src/posix/cocoa/i_system.mm +++ b/src/posix/cocoa/i_system.mm @@ -2,7 +2,7 @@ ** i_system.mm ** **--------------------------------------------------------------------------- - ** Copyright 2012-2015 Alexey Lysiuk + ** Copyright 2012-2018 Alexey Lysiuk ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without @@ -65,7 +65,7 @@ void I_Tactile(int /*on*/, int /*off*/, int /*total*/) ticcmd_t* I_BaseTiccmd() { static ticcmd_t emptycmd; - return &emptycmd; + return &emptycmd; } @@ -111,16 +111,16 @@ void I_Init(void) DumpCPUInfo(&CPU); atterm(I_ShutdownSound); - I_InitSound(); + I_InitSound(); } static int has_exited; void I_Quit() { - has_exited = 1; // Prevent infinitely recursive exits -- killough + has_exited = 1; // Prevent infinitely recursive exits -- killough - if (demorecording) + if (demorecording) { G_CheckDemoStatus(); } @@ -134,11 +134,11 @@ bool gameisdead; void I_FatalError(const char* const error, ...) { - static bool alreadyThrown = false; - gameisdead = true; + static bool alreadyThrown = false; + gameisdead = true; - if (!alreadyThrown) // ignore all but the first message -- killough - { + if (!alreadyThrown) // ignore all but the first message -- killough + { alreadyThrown = true; char errortext[MAX_ERRORTEXT]; @@ -160,25 +160,25 @@ void I_FatalError(const char* const error, ...) fprintf(stderr, "%s\n", errortext); exit(-1); - } + } - if (!has_exited) // If it hasn't exited yet, exit now -- killough - { + if (!has_exited) // If it hasn't exited yet, exit now -- killough + { has_exited = 1; // Prevent infinitely recursive exits -- killough exit(-1); - } + } } void I_Error(const char* const error, ...) { - va_list argptr; - char errortext[MAX_ERRORTEXT]; + va_list argptr; + char errortext[MAX_ERRORTEXT]; - va_start(argptr, error); - vsnprintf(errortext, MAX_ERRORTEXT, error, argptr); - va_end(argptr); + va_start(argptr, error); + vsnprintf(errortext, MAX_ERRORTEXT, error, argptr); + va_end(argptr); - throw CRecoverableError(errortext); + throw CRecoverableError(errortext); } @@ -272,7 +272,7 @@ static int matchfile(struct dirent *ent) static int matchfile(const struct dirent *ent) #endif { - return fnmatch(pattern, ent->d_name, FNM_NOESCAPE) == 0; + return fnmatch(pattern, ent->d_name, FNM_NOESCAPE) == 0; } void* I_FindFirst(const char* const filespec, findstate_t* const fileinfo) @@ -292,24 +292,24 @@ void* I_FindFirst(const char* const filespec, findstate_t* const fileinfo) dir = "."; } - fileinfo->current = 0; - fileinfo->count = scandir(dir.GetChars(), &fileinfo->namelist, matchfile, alphasort); + fileinfo->current = 0; + fileinfo->count = scandir(dir.GetChars(), &fileinfo->namelist, matchfile, alphasort); - if (fileinfo->count > 0) - { + if (fileinfo->count > 0) + { return fileinfo; - } + } - return (void*)-1; + return (void*)-1; } int I_FindNext(void* const handle, findstate_t* const fileinfo) { - findstate_t* const state = static_cast(handle); + findstate_t* const state = static_cast(handle); - if (state->current < fileinfo->count) - { - return ++state->current < fileinfo->count ? 0 : -1; + if (state->current < fileinfo->count) + { + return ++state->current < fileinfo->count ? 0 : -1; } return -1;