mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 09:25:44 +01:00
rename nbt_prim_tagsize to nbt_primsize, for consistency.
This commit is contained in:
@@ -44,7 +44,7 @@ static u8 const *nbt_nexttag(u8 const *restrict buf) {
|
|||||||
case NBT_I64:
|
case NBT_I64:
|
||||||
case NBT_F32:
|
case NBT_F32:
|
||||||
case NBT_F64:
|
case NBT_F64:
|
||||||
nxt += nbt_prim_tagsize(*buf);
|
nxt += nbt_primsize(*buf);
|
||||||
return nxt;
|
return nxt;
|
||||||
|
|
||||||
case NBT_ARR_I64:
|
case NBT_ARR_I64:
|
||||||
@@ -60,7 +60,7 @@ static u8 const *nbt_nexttag(u8 const *restrict buf) {
|
|||||||
return nxt;
|
return nxt;
|
||||||
|
|
||||||
case NBT_LIST:
|
case NBT_LIST:
|
||||||
mems = nbt_prim_tagsize(*nxt);
|
mems = nbt_primsize(*nxt);
|
||||||
if (mems > 0) {
|
if (mems > 0) {
|
||||||
nxt += 1;
|
nxt += 1;
|
||||||
nxt += mems * nbt_arrlen(nxt);
|
nxt += mems * nbt_arrlen(nxt);
|
||||||
@@ -87,7 +87,7 @@ int nbt_proc(void **restrict datout, u8 const *restrict buf, size_t len) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int nbt_prim_tagsize(u8 tag) {
|
int nbt_primsize(u8 tag) {
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
case NBT_I8: return 1;
|
case NBT_I8: return 1;
|
||||||
case NBT_I16: return 2;
|
case NBT_I16: return 2;
|
||||||
|
|||||||
@@ -42,4 +42,4 @@ atrb_const int nbt_isprim(u8 tag);
|
|||||||
|
|
||||||
|
|
||||||
/* gets the tag size of primitive types, returns `>0` on success, `<0` on failure */
|
/* gets the tag size of primitive types, returns `>0` on success, `<0` on failure */
|
||||||
atrb_const int nbt_prim_tagsize(u8 tag);
|
atrb_const int nbt_primsize(u8 tag);
|
||||||
|
|||||||
Reference in New Issue
Block a user