mirror of
https://github.com/thepigeongenerator/mcaselector-lite
synced 2026-02-08 07:33:35 +01:00
Rename CONF_I* to CONF_S, to match the recent typedef change.
Note: not changing `NBT_I*` macros, since the NBT specification does not specify a difference between signed/unsigned types. Generally speaking, internally we treat these as unsigned types for the purpose of computations being correct.
This commit is contained in:
@@ -48,10 +48,10 @@ int conf_procval(u8 type, const char *val, void *out)
|
||||
switch (type) {
|
||||
case CONF_STR: *(char **)out = strdup(val); return 0;
|
||||
|
||||
case CONF_I8: *(s8 *)out = strtoimax(val, &end, 0); return (end && !*end);
|
||||
case CONF_I16: *(s16 *)out = strtoimax(val, &end, 0); return (end && !*end);
|
||||
case CONF_I32: *(s32 *)out = strtoimax(val, &end, 0); return (end && !*end);
|
||||
case CONF_I64: *(s64 *)out = strtoimax(val, &end, 0); return (end && !*end);
|
||||
case CONF_S8: *(s8 *)out = strtoimax(val, &end, 0); return (end && !*end);
|
||||
case CONF_S16: *(s16 *)out = strtoimax(val, &end, 0); return (end && !*end);
|
||||
case CONF_S32: *(s32 *)out = strtoimax(val, &end, 0); return (end && !*end);
|
||||
case CONF_S64: *(s64 *)out = strtoimax(val, &end, 0); return (end && !*end);
|
||||
|
||||
case CONF_U8: *(u8 *)out = strtoumax(val, &end, 0); return (end && !*end);
|
||||
case CONF_U16: *(u16 *)out = strtoumax(val, &end, 0); return (end && !*end);
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
|
||||
enum conf_type {
|
||||
CONF_STR = 0x00,
|
||||
CONF_I8 = 0x00 | 0x01,
|
||||
CONF_I16 = 0x00 | 0x02,
|
||||
CONF_I32 = 0x00 | 0x04,
|
||||
CONF_I64 = 0x00 | 0x08,
|
||||
CONF_S8 = 0x00 | 0x01,
|
||||
CONF_S16 = 0x00 | 0x02,
|
||||
CONF_S32 = 0x00 | 0x04,
|
||||
CONF_S64 = 0x00 | 0x08,
|
||||
CONF_U8 = 0x10 | 0x01,
|
||||
CONF_U16 = 0x10 | 0x02,
|
||||
CONF_U32 = 0x10 | 0x04,
|
||||
|
||||
Reference in New Issue
Block a user