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