Skip to content

Commit a2d27e4

Browse files
committed
Applied source formatting
1 parent bbd05a5 commit a2d27e4

File tree

10 files changed

+105
-106
lines changed

10 files changed

+105
-106
lines changed

Client/game_sa/CWorldSA.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ void _declspec(naked) HOOK_FallenPeds()
5252
}
5353
}
5454

55-
5655
void _declspec(naked) HOOK_FallenCars()
5756
{
5857
if (pGame && !pGame->IsUnderWorldWarpEnabled())

Client/mods/deathmatch/logic/CModelNames.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2411,7 +2411,7 @@ struct
24112411
330, "Phone",
24122412
331, "Brass_Knuckles",
24132413
333, "Golf_Club",
2414-
334, "Night_Strick", // typo here retained for BC
2414+
334, "Night_Strick", // typo here retained for BC
24152415
334, "Night_Stick",
24162416
335, "Knife",
24172417
336, "Baseball_Bat",

Client/mods/deathmatch/logic/CServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ unsigned long CServer::Thread_Run(void)
251251
if (m_pLibrary->Load(m_strDLLFile))
252252
{
253253
// Grab the entrypoint
254-
typedef int(Main_t)(int, char*[]);
254+
typedef int(Main_t)(int, char* []);
255255
Main_t* pfnEntryPoint = reinterpret_cast<Main_t*>(m_pLibrary->GetProcedureAddress("Run"));
256256
if (pfnEntryPoint)
257257
{

Server/launcher/Main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ int main(int argc, char* argv[])
128128
if (Core.Load(LIB_CORE))
129129
{
130130
// Grab the entrypoint
131-
typedef int(Main_t)(int, char*[]);
131+
typedef int(Main_t)(int, char* []);
132132
Main_t* pfnEntryPoint = reinterpret_cast<Main_t*>((long long)(Core.GetProcedureAddress("Run")));
133133
if (pfnEntryPoint)
134134
{

Server/mods/deathmatch/logic/ASEQuerySDK.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ actual .h stuff follows
109109
*/
110110
extern "C"
111111
{
112-
extern int ASEQuery_initialize(int hostport, int internet, char *address);
112+
extern int ASEQuery_initialize(int hostport, int internet, char* address);
113113

114114
extern void ASEQuery_shutdown(void);
115115

@@ -119,10 +119,10 @@ extern "C"
119119
void ASEQuery_wantrules(void);
120120
void ASEQuery_wantplayers(void);
121121

122-
extern void ASEQuery_status(const char *hostname, const char *gametype, const char *mapname, const char *gamever, int password, int numplayers,
122+
extern void ASEQuery_status(const char* hostname, const char* gametype, const char* mapname, const char* gamever, int password, int numplayers,
123123
int maxplayers);
124-
extern void ASEQuery_addrule(const char *key, const char *value);
125-
extern void ASEQuery_addplayer(const char *name, const char *team, const char *skin, const char *score, const char *ping, const char *time);
124+
extern void ASEQuery_addrule(const char* key, const char* value);
125+
extern void ASEQuery_addplayer(const char* name, const char* team, const char* skin, const char* score, const char* ping, const char* time);
126126

127-
extern char *ASEQuery_error;
127+
extern char* ASEQuery_error;
128128
}

Shared/sdk/UTF8.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#define BAD_WCHAR ((wchar_t) 0xfffd)
3333
#define BAD_CHAR '?'
3434

35-
int utf8_mbtowc(wchar_t *pwc, const unsigned char *src, int src_len)
35+
int utf8_mbtowc(wchar_t* pwc, const unsigned char* src, int src_len)
3636
{
3737
if (!pwc)
3838
return 0;
@@ -100,7 +100,7 @@ int utf8_mbtowc(wchar_t *pwc, const unsigned char *src, int src_len)
100100
return RET_ILSEQ;
101101
}
102102

103-
int utf8_wctomb(unsigned char *dest, wchar_t wc, int dest_size)
103+
int utf8_wctomb(unsigned char* dest, wchar_t wc, int dest_size)
104104
{
105105
if (!dest)
106106
return 0;
@@ -155,14 +155,14 @@ int utf8_wctomb(unsigned char *dest, wchar_t wc, int dest_size)
155155
// Original - For testing
156156
//
157157

158-
std::wstring utf8_mbstowcs_orig(const std::string &str)
158+
std::wstring utf8_mbstowcs_orig(const std::string& str)
159159
{
160160
std::wstring wstr;
161161
wchar_t wc;
162162
unsigned int sn = 0;
163163
int un = 0;
164164

165-
const unsigned char *s = (const unsigned char *)str.c_str();
165+
const unsigned char* s = (const unsigned char*)str.c_str();
166166

167167
while (sn < str.length() && *s != 0 && (un = utf8_mbtowc(&wc, s, str.length() - sn)) > 0)
168168
{
@@ -173,15 +173,15 @@ std::wstring utf8_mbstowcs_orig(const std::string &str)
173173
return wstr;
174174
}
175175

176-
std::string utf8_wcstombs_orig(const std::wstring &wstr)
176+
std::string utf8_wcstombs_orig(const std::wstring& wstr)
177177
{
178178
std::string str;
179179
char utf8[6];
180180
int un = 0;
181181

182182
for (unsigned int i = 0; i < wstr.size(); ++i)
183183
{
184-
un = utf8_wctomb((unsigned char *)utf8, wstr[i], 6);
184+
un = utf8_wctomb((unsigned char*)utf8, wstr[i], 6);
185185
if (un > 0)
186186
str.append(utf8, un);
187187
}
@@ -194,9 +194,9 @@ std::string utf8_wcstombs_orig(const std::wstring &wstr)
194194
//
195195
#define SMALL_STRING_LIMIT 1000
196196

197-
std::wstring utf8_mbstowcs(const std::string &str)
197+
std::wstring utf8_mbstowcs(const std::string& str)
198198
{
199-
const unsigned char *s = (const unsigned char *)str.c_str();
199+
const unsigned char* s = (const unsigned char*)str.c_str();
200200
const unsigned int length = str.length();
201201

202202
if (length < SMALL_STRING_LIMIT)
@@ -205,8 +205,8 @@ std::wstring utf8_mbstowcs(const std::string &str)
205205
uint cCharacters = length + 1;
206206
uint cBytes = (cCharacters) * sizeof(wchar_t);
207207

208-
wchar_t * buffer = (wchar_t *)alloca(cBytes);
209-
wchar_t * ptr = buffer;
208+
wchar_t* buffer = (wchar_t*)alloca(cBytes);
209+
wchar_t* ptr = buffer;
210210
wchar_t wc;
211211
unsigned int sn = 0;
212212
int un = 0;
@@ -240,19 +240,19 @@ std::wstring utf8_mbstowcs(const std::string &str)
240240
}
241241

242242
// Optimized
243-
std::string utf8_wcstombs(const std::wstring &wstr)
243+
std::string utf8_wcstombs(const std::wstring& wstr)
244244
{
245245
const unsigned int size = wstr.length();
246246

247247
if (size < SMALL_STRING_LIMIT)
248248
{
249249
// Faster but limited size
250250
uint cBytes = (size + 1) * 6;
251-
char *buffer = (char *)alloca(cBytes);
252-
char *ptr = buffer;
251+
char* buffer = (char*)alloca(cBytes);
252+
char* ptr = buffer;
253253
for (unsigned int i = 0; i < size; ++i)
254254
{
255-
ptr += utf8_wctomb((unsigned char *)ptr, wstr[i], 6);
255+
ptr += utf8_wctomb((unsigned char*)ptr, wstr[i], 6);
256256
}
257257
size_t usedsize = ptr - buffer;
258258
dassert(usedsize < cBytes);
@@ -266,7 +266,7 @@ std::string utf8_wcstombs(const std::wstring &wstr)
266266

267267
for (unsigned int i = 0; i < size; ++i)
268268
{
269-
int un = utf8_wctomb((unsigned char *)utf8, wstr[i], 6);
269+
int un = utf8_wctomb((unsigned char*)utf8, wstr[i], 6);
270270
if (un > 0)
271271
str.append(utf8, un);
272272
}

Shared/sdk/sha1.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,21 @@ extern "C"
6565
*
6666
* \param ctx SHA-1 context to be initialized
6767
*/
68-
void sha1_init(sha1_context *ctx);
68+
void sha1_init(sha1_context* ctx);
6969

7070
/**
7171
* \brief Clear SHA-1 context
7272
*
7373
* \param ctx SHA-1 context to be cleared
7474
*/
75-
void sha1_free(sha1_context *ctx);
75+
void sha1_free(sha1_context* ctx);
7676

7777
/**
7878
* \brief SHA-1 context setup
7979
*
8080
* \param ctx context to be initialized
8181
*/
82-
void sha1_starts(sha1_context *ctx);
82+
void sha1_starts(sha1_context* ctx);
8383

8484
/**
8585
* \brief SHA-1 process buffer
@@ -88,18 +88,18 @@ extern "C"
8888
* \param input buffer holding the data
8989
* \param ilen length of the input data
9090
*/
91-
void sha1_update(sha1_context *ctx, const unsigned char *input, size_t ilen);
91+
void sha1_update(sha1_context* ctx, const unsigned char* input, size_t ilen);
9292

9393
/**
9494
* \brief SHA-1 final digest
9595
*
9696
* \param ctx SHA-1 context
9797
* \param output SHA-1 checksum result
9898
*/
99-
void sha1_finish(sha1_context *ctx, unsigned char output[20]);
99+
void sha1_finish(sha1_context* ctx, unsigned char output[20]);
100100

101101
/* Internal use */
102-
void sha1_process(sha1_context *ctx, const unsigned char data[64]);
102+
void sha1_process(sha1_context* ctx, const unsigned char data[64]);
103103

104104
#ifdef __cplusplus
105105
}
@@ -121,7 +121,7 @@ extern "C"
121121
* \param ilen length of the input data
122122
* \param output SHA-1 checksum result
123123
*/
124-
void sha1(const unsigned char *input, size_t ilen, unsigned char output[20]);
124+
void sha1(const unsigned char* input, size_t ilen, unsigned char output[20]);
125125

126126
/**
127127
* \brief Output = SHA-1( file contents )
@@ -131,7 +131,7 @@ extern "C"
131131
*
132132
* \return 0 if successful, or POLARSSL_ERR_SHA1_FILE_IO_ERROR
133133
*/
134-
int sha1_file(const char *path, unsigned char output[20]);
134+
int sha1_file(const char* path, unsigned char output[20]);
135135

136136
/**
137137
* \brief SHA-1 HMAC context setup
@@ -140,7 +140,7 @@ extern "C"
140140
* \param key HMAC secret key
141141
* \param keylen length of the HMAC key
142142
*/
143-
void sha1_hmac_starts(sha1_context *ctx, const unsigned char *key, size_t keylen);
143+
void sha1_hmac_starts(sha1_context* ctx, const unsigned char* key, size_t keylen);
144144

145145
/**
146146
* \brief SHA-1 HMAC process buffer
@@ -149,22 +149,22 @@ extern "C"
149149
* \param input buffer holding the data
150150
* \param ilen length of the input data
151151
*/
152-
void sha1_hmac_update(sha1_context *ctx, const unsigned char *input, size_t ilen);
152+
void sha1_hmac_update(sha1_context* ctx, const unsigned char* input, size_t ilen);
153153

154154
/**
155155
* \brief SHA-1 HMAC final digest
156156
*
157157
* \param ctx HMAC context
158158
* \param output SHA-1 HMAC checksum result
159159
*/
160-
void sha1_hmac_finish(sha1_context *ctx, unsigned char output[20]);
160+
void sha1_hmac_finish(sha1_context* ctx, unsigned char output[20]);
161161

162162
/**
163163
* \brief SHA-1 HMAC context reset
164164
*
165165
* \param ctx HMAC context to be reset
166166
*/
167-
void sha1_hmac_reset(sha1_context *ctx);
167+
void sha1_hmac_reset(sha1_context* ctx);
168168

169169
/**
170170
* \brief Output = HMAC-SHA-1( hmac key, input buffer )
@@ -175,7 +175,7 @@ extern "C"
175175
* \param ilen length of the input data
176176
* \param output HMAC-SHA-1 result
177177
*/
178-
void sha1_hmac(const unsigned char *key, size_t keylen, const unsigned char *input, size_t ilen, unsigned char output[20]);
178+
void sha1_hmac(const unsigned char* key, size_t keylen, const unsigned char* input, size_t ilen, unsigned char output[20]);
179179

180180
/**
181181
* \brief Checkup routine

0 commit comments

Comments
 (0)