Skip to content

Commit 2c30a74

Browse files
committed
Format some source files
1 parent 6921e4a commit 2c30a74

3 files changed

Lines changed: 22 additions & 25 deletions

File tree

src/Main.Ext.cpp

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,25 +60,26 @@ void Main::DetachFromDebugger()
6060

6161
bool Main::TryDetachFromDebugger()
6262
{
63-
auto GetDebuggerProcessId = [](DWORD dwSelfProcessId) -> DWORD
64-
{
65-
DWORD dwParentProcessId = -1;
66-
HANDLE hSnapshot = CreateToolhelp32Snapshot(2, 0);
67-
PROCESSENTRY32 pe32;
68-
pe32.dwSize = sizeof(PROCESSENTRY32);
69-
Process32First(hSnapshot, &pe32);
70-
do
63+
auto GetDebuggerProcessId =
64+
[](DWORD dwSelfProcessId) -> DWORD
7165
{
72-
if (pe32.th32ProcessID == dwSelfProcessId)
66+
DWORD dwParentProcessId = -1;
67+
HANDLE hSnapshot = CreateToolhelp32Snapshot(2, 0);
68+
PROCESSENTRY32 pe32;
69+
pe32.dwSize = sizeof(PROCESSENTRY32);
70+
Process32First(hSnapshot, &pe32);
71+
do
7372
{
74-
dwParentProcessId = pe32.th32ParentProcessID;
75-
break;
73+
if (pe32.th32ProcessID == dwSelfProcessId)
74+
{
75+
dwParentProcessId = pe32.th32ParentProcessID;
76+
break;
77+
}
7678
}
77-
}
78-
while (Process32Next(hSnapshot, &pe32));
79-
CloseHandle(hSnapshot);
80-
return dwParentProcessId;
81-
};
79+
while (Process32Next(hSnapshot, &pe32));
80+
CloseHandle(hSnapshot);
81+
return dwParentProcessId;
82+
};
8283

8384
HMODULE hModule = LoadLibrary("ntdll.dll");
8485
if (hModule != NULL)

src/Spawner/NetHack.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ class NetHack
2929
public:
3030
static bool PortHack;
3131

32-
static
33-
int WINAPI SendTo(
32+
static int WINAPI SendTo(
3433
int sockfd,
3534
char* buf,
3635
size_t len,
@@ -39,8 +38,7 @@ class NetHack
3938
int addrlen
4039
);
4140

42-
static
43-
int WINAPI RecvFrom(
41+
static int WINAPI RecvFrom(
4442
int sockfd,
4543
char* buf,
4644
size_t len,
@@ -57,8 +55,7 @@ class Tunnel
5755
static u_long Ip;
5856
static u_short Port;
5957

60-
static
61-
int WINAPI SendTo(
58+
static int WINAPI SendTo(
6259
int sockfd,
6360
char* buf,
6461
size_t len,
@@ -67,8 +64,7 @@ class Tunnel
6764
int addrlen
6865
);
6966

70-
static
71-
int WINAPI RecvFrom(
67+
static int WINAPI RecvFrom(
7268
int sockfd,
7369
char* buf,
7470
size_t len,

src/Spawner/Spawner.Config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ void SpawnerConfig::HouseConfig::LoadFromINIFile(CCINIClass* pINI, int index)
197197

198198
if (pINI->GetSection(pAlliancesSection))
199199
{
200-
for(int i = 0; i < 8; i++)
200+
for (int i = 0; i < 8; i++)
201201
this->Alliances[i] = pINI->ReadInteger(pAlliancesSection, AlliancesTagArray[i], this->Alliances[i]);
202202
}
203203
}

0 commit comments

Comments
 (0)