Skip to content

Commit 6f26c2a

Browse files
committed
Apply win-apply-clang-format.bat
1 parent 39ccaef commit 6f26c2a

29 files changed

+115
-115
lines changed

Client/core/CLanguageSelector.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,7 @@ void CLanguageSelector::DoPulse()
257257
pItem->fFocusEffectPos += Clamp(-fMaxAmount, pItem->fFocusEffectTarget - pItem->fFocusEffectPos, fMaxAmount);
258258

259259
// Move label
260-
CVector2D vecLabelZoomPos =
261-
pItem->vecLabelInitialPos + CVector2D(pItem->vecLabelInitialSize.fX * pItem->fFocusEffectPos * 0.05f, 0);
260+
CVector2D vecLabelZoomPos = pItem->vecLabelInitialPos + CVector2D(pItem->vecLabelInitialSize.fX * pItem->fFocusEffectPos * 0.05f, 0);
262261
pItem->pLabel->SetPosition(vecLabelZoomPos);
263262
}
264263
}

Client/core/Graphics/CTileBatcher.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ void CTileBatcher::AddTile(float fX1, float fY1, float fX2, float fY2, float fU1
280280

281281
uint uiTessellationX = 1;
282282
uint uiTessellationY = 1;
283-
bool bUseCustomMatrices{ false };
283+
bool bUseCustomMatrices{false};
284284

285285
// Get settings from shader
286286
if (CShaderInstance* pShaderInstance = DynamicCast<CShaderInstance>(pMaterial))

Client/game_sa/CRenderWareSA.ShaderSupport.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
#include "CRenderWareSA.h"
1515

1616
#ifdef MTA_DEBUG
17-
// Comment out the lines below for your desired debug options
18-
// #define SHADER_DEBUG_CHECKS // Do lots of validation which can slow a debug build
19-
// #define SHADER_DEBUG_OUTPUT // Output lots of debug strings
17+
// Comment out the lines below for your desired debug options
18+
// #define SHADER_DEBUG_CHECKS // Do lots of validation which can slow a debug build
19+
// #define SHADER_DEBUG_OUTPUT // Output lots of debug strings
2020
#endif
2121

2222
// Various dodgy pointer values

Client/mods/deathmatch/ClientCommands.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void COMMAND_ServerInfo(const char* szCmdLine);
4646
// DISABLE THESE BEFORE RELEASE
4747
#ifdef MTA_DEBUG
4848
void COMMAND_ShowSyncData(const char* szCmdLine);
49-
// void COMMAND_DumpPlayers ( const char* szCmdLine );
49+
// void COMMAND_DumpPlayers ( const char* szCmdLine );
5050
#endif
5151

5252
#if defined(MTA_DEBUG) || defined(MTA_BETA)

Client/mods/deathmatch/logic/luadefs/CLuaDrawingDefs.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,25 +1729,25 @@ int CLuaDrawingDefs::DxGetStatus(lua_State* luaVM)
17291729
lua_settable(luaVM, -3);
17301730

17311731
lua::Push(luaVM, "SettingDebugMode");
1732-
lua::Push(luaVM, []{
1732+
lua::Push(luaVM, [] {
17331733
switch (g_pCore->GetDiagnosticDebug())
17341734
{
1735-
case EDiagnosticDebug::GRAPHICS_6734:
1736-
return "#6734 Graphics";
1737-
case EDiagnosticDebug::D3D_6732:
1738-
return "#6732 D3D";
1739-
case EDiagnosticDebug::LOG_TIMING_0000:
1740-
return "#0000 Log timing";
1741-
case EDiagnosticDebug::JOYSTICK_0000:
1742-
return "#0000 Joystick";
1743-
case EDiagnosticDebug::LUA_TRACE_0000:
1744-
return "#0000 Lua trace";
1745-
case EDiagnosticDebug::RESIZE_ALWAYS_0000:
1746-
return "#0000 Resize always";
1747-
case EDiagnosticDebug::RESIZE_NEVER_0000:
1748-
return "#0000 Resize never";
1749-
default:
1750-
return "Default";
1735+
case EDiagnosticDebug::GRAPHICS_6734:
1736+
return "#6734 Graphics";
1737+
case EDiagnosticDebug::D3D_6732:
1738+
return "#6732 D3D";
1739+
case EDiagnosticDebug::LOG_TIMING_0000:
1740+
return "#0000 Log timing";
1741+
case EDiagnosticDebug::JOYSTICK_0000:
1742+
return "#0000 Joystick";
1743+
case EDiagnosticDebug::LUA_TRACE_0000:
1744+
return "#0000 Lua trace";
1745+
case EDiagnosticDebug::RESIZE_ALWAYS_0000:
1746+
return "#0000 Resize always";
1747+
case EDiagnosticDebug::RESIZE_NEVER_0000:
1748+
return "#0000 Resize never";
1749+
default:
1750+
return "Default";
17511751
}
17521752
}());
17531753
lua_settable(luaVM, -3);

Client/sdk/game/CStreaming.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ class CStreaming
4343
virtual uint32 GetStreamingBufferSize() = 0;
4444
virtual void MakeSpaceFor(std::uint32_t memoryToCleanInBytes) = 0;
4545
virtual std::uint32_t GetMemoryUsed() const = 0;
46-
virtual void RemoveBigBuildings() = 0;
46+
virtual void RemoveBigBuildings() = 0;
4747
};

Client/sdk/ijsify.h

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -81,45 +81,45 @@ extern DWORD* g_Table;
8181
extern DWORD* g_TableSize;
8282
extern DWORD g_dwTable;
8383

84-
/*
85-
inline void* __cdecl operator new ( unsigned int uiSize )
86-
{
87-
DWORD dwOld, dwData;
84+
/*
85+
inline void* __cdecl operator new ( unsigned int uiSize )
86+
{
87+
DWORD dwOld, dwData;
8888
89-
if ( !g_bBoundsChecker ) {
90-
dwData = (DWORD)HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, uiSize);
91-
VirtualProtect ( (void*)dwData, uiSize, PAGE_EXECUTE_READWRITE, &dwOld );
92-
return (void*)dwData;
93-
}
94-
// define the guard bytes
95-
DWORD dwGuardBegin = 0xBEEFFDFD;
96-
WORD wGuardEnd = 0xDEAC;
89+
if ( !g_bBoundsChecker ) {
90+
dwData = (DWORD)HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, uiSize);
91+
VirtualProtect ( (void*)dwData, uiSize, PAGE_EXECUTE_READWRITE, &dwOld );
92+
return (void*)dwData;
93+
}
94+
// define the guard bytes
95+
DWORD dwGuardBegin = 0xBEEFFDFD;
96+
WORD wGuardEnd = 0xDEAC;
9797
98-
// allocate ( size + 4 (begin) + 2 (end) )
99-
dwData = (DWORD) HeapAlloc ( GetProcessHeap (), HEAP_ZERO_MEMORY, uiSize + 6 );
98+
// allocate ( size + 4 (begin) + 2 (end) )
99+
dwData = (DWORD) HeapAlloc ( GetProcessHeap (), HEAP_ZERO_MEMORY, uiSize + 6 );
100100
101-
// [0 -> 4] insert begin guard bytes
102-
memcpy ( (void*)(dwData), &dwGuardBegin, 4 );
103-
uiSize += 4;
101+
// [0 -> 4] insert begin guard bytes
102+
memcpy ( (void*)(dwData), &dwGuardBegin, 4 );
103+
uiSize += 4;
104104
105-
// [x -> x+2] insert end guard bytes
106-
memcpy ( (void*)(dwData + uiSize), &wGuardEnd, 2 );
107-
uiSize += 2;
105+
// [x -> x+2] insert end guard bytes
106+
memcpy ( (void*)(dwData + uiSize), &wGuardEnd, 2 );
107+
uiSize += 2;
108108
109-
// set guard protection state
110-
VirtualProtect ( (void*)dwData, uiSize, PAGE_EXECUTE_READWRITE | PAGE_GUARD, &dwOld );
109+
// set guard protection state
110+
VirtualProtect ( (void*)dwData, uiSize, PAGE_EXECUTE_READWRITE | PAGE_GUARD, &dwOld );
111111
112-
g_Table[g_dwTable] = dwData;
113-
g_TableSize[g_dwTable++] = (DWORD)uiSize;
112+
g_Table[g_dwTable] = dwData;
113+
g_TableSize[g_dwTable++] = (DWORD)uiSize;
114114
115-
// and return the correct data pointer
116-
return (void*)( dwData + 4 );
115+
// and return the correct data pointer
116+
return (void*)( dwData + 4 );
117117
118-
};
118+
};
119119
120-
inline void __cdecl operator delete ( void* pData )
121-
{
122-
HeapFree ( GetProcessHeap(), 0, pData );
123-
};
124-
*/
120+
inline void __cdecl operator delete ( void* pData )
121+
{
122+
HeapFree ( GetProcessHeap(), 0, pData );
123+
};
124+
*/
125125
#endif

Server/core/CCrashHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ inline __attribute__((always_inline)) static void SaveBacktraceSummary()
142142
}
143143
}
144144

145-
// Linux/Mac crash callback when using google-breakpad
145+
// Linux/Mac crash callback when using google-breakpad
146146
#ifdef __APPLE__
147147
bool DumpCallback(const char* dump_dir, const char* minidump_id, void* context, bool succeeded)
148148
{

Server/core/CCrashHandlerAPI.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ static LPTOP_LEVEL_EXCEPTION_FILTER g_pfnOrigFilt = NULL;
4646
// The exception handler
4747
LONG __stdcall CrashHandlerExceptionFilter(EXCEPTION_POINTERS* pExPtrs);
4848

49-
/*//////////////////////////////////////////////////////////////////////
50-
Destructor Class
51-
//////////////////////////////////////////////////////////////////////*/
52-
// See the note in MEMDUMPVALIDATOR.CPP about automatic classes.
53-
// Turn off warning : initializers put in library initialization area
49+
/*//////////////////////////////////////////////////////////////////////
50+
Destructor Class
51+
//////////////////////////////////////////////////////////////////////*/
52+
// See the note in MEMDUMPVALIDATOR.CPP about automatic classes.
53+
// Turn off warning : initializers put in library initialization area
5454
#pragma warning (disable : 4073)
5555
#pragma init_seg(lib)
5656
class CleanUpCrashHandler

Server/core/Server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "SharedUtil.hpp"
1717
#include "ErrorCodes.h"
1818
#ifdef WIN_x86
19-
// TODO - 64 bit file hooks
19+
// TODO - 64 bit file hooks
2020
#include "SharedUtil.Win32Utf8FileHooks.hpp"
2121
#endif
2222

Server/core/StdInc.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313
#include <string>
1414

1515
#ifndef WIN32
16-
// Linux allocation tracking doesn't work in this module for some reason
16+
// Linux allocation tracking doesn't work in this module for some reason
1717
#define WITH_ALLOC_TRACKING 0
1818
#endif
1919
#include "SharedUtil.h"
2020

2121
#ifdef WIN32
22-
//
23-
// Windows
24-
//
22+
//
23+
// Windows
24+
//
2525
#include <conio.h>
2626
#include <direct.h>
2727
#include <windows.h>
2828
#else
29-
//
30-
// POSIX
31-
//
29+
//
30+
// POSIX
31+
//
3232
#include <stdlib.h>
3333
#include <unistd.h>
3434
#include <fcntl.h>

Server/dbconmy/StdInc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#include <MTAPlatform.h>
2525

2626
#ifdef WIN32
27-
//
28-
// Windows
29-
//
27+
//
28+
// Windows
29+
//
3030
#include <windows.h>
3131
#include <mmsystem.h>
3232
#endif

Server/launcher/Main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "SharedUtil.h"
2727

2828
#ifdef WIN32
29-
// Linux gcc 4.4.5 memory corruption on destruction of g_StatEvents (Reason unknown)
29+
// Linux gcc 4.4.5 memory corruption on destruction of g_StatEvents (Reason unknown)
3030
#include "SharedUtil.hpp"
3131
#else
3232
#include <unistd.h>

Server/mods/deathmatch/StdInc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
#include "MTAPlatform.h"
2828

2929
#ifdef WIN32
30-
//
31-
// Windows
32-
//
30+
//
31+
// Windows
32+
//
3333
#include <winsock2.h>
3434
#include <windows.h>
3535
#include <mmsystem.h>

Server/mods/deathmatch/logic/CPed.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,11 @@ class CPed : public CElement
269269
void SetCollisionEnabled(bool bCollisionEnabled) { m_bCollisionsEnabled = bCollisionEnabled; }
270270

271271
long long GetLastFarSyncTick() { return m_llLastFarSyncTick; }
272-
void SetLastFarSyncTick(long long llLastSyncTick) { m_llLastFarSyncTick = llLastSyncTick; }
272+
void SetLastFarSyncTick(long long llLastSyncTick) { m_llLastFarSyncTick = llLastSyncTick; }
273273

274-
void ClearNearPlayersList() { m_nearPlayersList.clear(); }
275-
void AddPlayerToNearList(CPlayer* pPlayer) { m_nearPlayersList.push_back(pPlayer); }
276-
bool IsNearPlayersListEmpty() { return m_nearPlayersList.empty(); }
274+
void ClearNearPlayersList() { m_nearPlayersList.clear(); }
275+
void AddPlayerToNearList(CPlayer* pPlayer) { m_nearPlayersList.push_back(pPlayer); }
276+
bool IsNearPlayersListEmpty() { return m_nearPlayersList.empty(); }
277277
std::vector<CPlayer*>::const_iterator NearPlayersIterBegin() { return m_nearPlayersList.begin(); }
278278
std::vector<CPlayer*>::const_iterator NearPlayersIterEnd() { return m_nearPlayersList.end(); }
279279

Server/mods/deathmatch/logic/CPedSync.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,17 @@ void CPedSync::UpdateSyncer(CPed* pPed)
111111
if (pSyncer)
112112
{
113113
// Is he close enough, and in the right dimension?
114-
if (IsSyncerPersistent() || (pPed->GetDimension() == pSyncer->GetDimension()
115-
&& IsPointNearPoint3D(pSyncer->GetPosition(), pPed->GetPosition(), (float)g_TickRateSettings.iPedSyncerDistance)))
116-
return;
114+
if (IsSyncerPersistent() || (pPed->GetDimension() == pSyncer->GetDimension() &&
115+
IsPointNearPoint3D(pSyncer->GetPosition(), pPed->GetPosition(), (float)g_TickRateSettings.iPedSyncerDistance)))
116+
return;
117117

118118
// Stop him from syncing it
119119
StopSync(pPed);
120120
}
121121

122122
if (pPed->IsBeingDeleted())
123123
return;
124-
124+
125125
// Find a new syncer for it
126126
FindSyncer(pPed);
127127
}
@@ -348,7 +348,7 @@ void CPedSync::UpdateNearPlayersList()
348348

349349
// Check distance accurately because the spatial database is 2D
350350
if ((vecCameraPosition - pPed->GetPosition()).LengthSquared() < DISTANCE_FOR_NEAR_VIEWER * DISTANCE_FOR_NEAR_VIEWER)
351-
pPed->AddPlayerToNearList(pPlayer);
351+
pPed->AddPlayerToNearList(pPlayer);
352352
}
353353
}
354354
}

Server/mods/deathmatch/logic/CUnoccupiedVehicleSync.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ void CUnoccupiedVehicleSync::UpdateVehicle(CVehicle* pVehicle)
131131
if (pSyncer)
132132
{
133133
// He isn't close enough to the vehicle and in the right dimension?
134-
if (!IsSyncerPersistent() && (!IsPointNearPoint3D(pSyncer->GetPosition(), pVehicle->GetPosition(), (float)g_TickRateSettings.iUnoccupiedVehicleSyncerDistance)) ||
134+
if (!IsSyncerPersistent() &&
135+
(!IsPointNearPoint3D(pSyncer->GetPosition(), pVehicle->GetPosition(), (float)g_TickRateSettings.iUnoccupiedVehicleSyncerDistance)) ||
135136
(pVehicle->GetDimension() != pSyncer->GetDimension()))
136137
{
137138
// Stop him from syncing it
@@ -497,7 +498,7 @@ void CUnoccupiedVehicleSync::Packet_UnoccupiedVehiclePushSync(CUnoccupiedVehicle
497498
{
498499
OverrideSyncer(pVehicle, pPlayer);
499500
}
500-
501+
501502
// Reset our push time
502503
pVehicle->ResetLastPushTime();
503504
}

Server/sdk/MTAPlatform.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ extern "C" bool g_bNoTopBar;
5757
// Define types
5858
typedef int socklen_t;
5959

60-
// Define keys
60+
// Define keys
6161
#define KEY_BACKSPACE 0x08
6262
#define KEY_EXTENDED 0xE0
6363
#define KEY_LEFT 0x4B

Shared/mods/deathmatch/logic/CLatentTransferManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void CLatentTransferManager::RemoveRemote(NetPlayerID remoteId)
9090
MapRemove(m_SendQueueMap, remoteId);
9191

9292
SAFE_DELETE(pSendQueue);
93-
93+
9494
if (pReceiver && pReceiver->IsInside())
9595
pReceiver->SetDeferredDelete();
9696
else

Shared/mods/deathmatch/logic/CLatentTransferManager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ class CLatentSendQueue
142142
class CLatentReceiver
143143
{
144144
friend struct SScopedGuardInsideMark;
145+
145146
public:
146147
ZERO_ON_NEW
147148
CLatentReceiver(NetPlayerID remoteId, ushort usBitStreamVersion);

Shared/mods/deathmatch/logic/lua/CLuaFunctionParser.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,9 @@ struct CLuaFunctionParserBase
439439
continue;
440440
}
441441

442-
int i = -2;
443-
auto k = PopUnsafe<key_t>(L, i);
444-
auto v = PopUnsafe<value_t>(L, i);
442+
int i = -2;
443+
auto k = PopUnsafe<key_t>(L, i);
444+
auto v = PopUnsafe<value_t>(L, i);
445445
map.emplace(std::move(k), std::move(v));
446446
lua_pop(L, 1); // drop value, keep key for lua_next
447447
}

Shared/publicsdk/Common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ using namespace std;
3838
#ifndef __COMMON_H
3939
#define __COMMON_H
4040

41-
// used in the function argument vector
41+
// used in the function argument vector
4242
#define MAX_ARGUMENTS 10
4343
struct FunctionArguments
4444
{

Shared/sdk/RTree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ o Minor updates for MSVC 2005/08 compilers
4646
#ifndef RTREE_H
4747
#define RTREE_H
4848

49-
// NOTE This file compiles under MSVC 6 SP5 and MSVC .Net 2003 it may not work on other compilers without modification.
49+
// NOTE This file compiles under MSVC 6 SP5 and MSVC .Net 2003 it may not work on other compilers without modification.
5050

51-
// NOTE These next few lines may be win32 specific, you may need to modify them to compile on other platform
51+
// NOTE These next few lines may be win32 specific, you may need to modify them to compile on other platform
5252
#include <stdio.h>
5353
#include <math.h>
5454
#include <stdlib.h>

0 commit comments

Comments
 (0)