mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
Comply to AMXX style for more consistency in 8f3605ea03d5
This commit is contained in:
parent
4d174007b1
commit
3075e0b375
@ -346,18 +346,18 @@ static cell AMX_NATIVE_CALL amx_strtol(AMX *amx, cell *params) /* 3 param */
|
||||
int len;
|
||||
int base = params[3];
|
||||
|
||||
if( base != 0 && ( base < 2 || base > 36 ) )
|
||||
if (base != 0 && (base < 2 || base > 36))
|
||||
base = 0;
|
||||
|
||||
char *pString = get_amxstring( amx, params[1], 0, len );
|
||||
cell *endPos = get_amxaddr( amx, params[2] );
|
||||
char *pString = get_amxstring(amx, params[1], 0, len);
|
||||
cell *endPos = get_amxaddr(amx, params[2]);
|
||||
|
||||
*endPos = -1;
|
||||
|
||||
char *pEnd = NULL;
|
||||
long result = strtol( pString, &pEnd, base );
|
||||
long result = strtol(pString, &pEnd, base);
|
||||
|
||||
if( pEnd != NULL && pString != pEnd )
|
||||
if (pEnd != NULL && pString != pEnd)
|
||||
*endPos = pEnd - pString;
|
||||
|
||||
return result;
|
||||
|
@ -117,7 +117,7 @@ native str_to_num(const string[]);
|
||||
* If the value read is out of the range of representable values by a cell,
|
||||
* the function returns 'cellmin' or 'cellmax'.
|
||||
*/
|
||||
native strtol( const string[], &endPos = -1, base = 0 );
|
||||
native strtol(const string[], &endPos = -1, base = 0);
|
||||
|
||||
/* Converts float to string. */
|
||||
native float_to_str(Float:fl, string[], len);
|
||||
|
Loading…
Reference in New Issue
Block a user