mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
Move atoi_safe() from editor.h to compat.h and #define Batoi atoi_safe
They were the same thing so they might as well be in the same place. git-svn-id: https://svn.eduke32.com/eduke32@8374 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/build/include/editor.h
This commit is contained in:
parent
0af13dcde0
commit
fd1656fbf2
1 changed files with 4 additions and 1 deletions
|
@ -568,7 +568,10 @@ typedef FILE BFILE;
|
|||
// parsing the decimal representation of 0xffffffff,
|
||||
// 4294967295 -- long is signed, so strtol would
|
||||
// return LONG_MAX (== 0x7fffffff on 32-bit archs))
|
||||
#define Batoi(str) ((int32_t)strtol(str, NULL, 10))
|
||||
|
||||
static FORCE_INLINE int32_t atoi_safe(const char *str) { return (int32_t)Bstrtol(str, NULL, 10); }
|
||||
|
||||
#define Batoi(x) atoi_safe(x)
|
||||
#define Batol(str) (strtol(str, NULL, 10))
|
||||
#define Batof(str) (strtod(str, NULL))
|
||||
|
||||
|
|
Loading…
Reference in a new issue