From 501c623f0154468d8d9ece9e2ccb1573d8051765 Mon Sep 17 00:00:00 2001 From: Quinn Date: Wed, 23 Jul 2025 12:29:44 +0200 Subject: [PATCH] rename `nbt_prim_tagsize` to `nbt_primsize`, for consistency. --- src/dat/nbt.c | 6 +++--- src/dat/nbt.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dat/nbt.c b/src/dat/nbt.c index 2ca6d5f..facc8ee 100644 --- a/src/dat/nbt.c +++ b/src/dat/nbt.c @@ -44,7 +44,7 @@ static u8 const *nbt_nexttag(u8 const *restrict buf) { case NBT_I64: case NBT_F32: case NBT_F64: - nxt += nbt_prim_tagsize(*buf); + nxt += nbt_primsize(*buf); return nxt; case NBT_ARR_I64: @@ -60,7 +60,7 @@ static u8 const *nbt_nexttag(u8 const *restrict buf) { return nxt; case NBT_LIST: - mems = nbt_prim_tagsize(*nxt); + mems = nbt_primsize(*nxt); if (mems > 0) { nxt += 1; nxt += mems * nbt_arrlen(nxt); @@ -87,7 +87,7 @@ int nbt_proc(void **restrict datout, u8 const *restrict buf, size_t len) { return 0; } -int nbt_prim_tagsize(u8 tag) { +int nbt_primsize(u8 tag) { switch (tag) { case NBT_I8: return 1; case NBT_I16: return 2; diff --git a/src/dat/nbt.h b/src/dat/nbt.h index be32a77..2bba880 100644 --- a/src/dat/nbt.h +++ b/src/dat/nbt.h @@ -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 */ -atrb_const int nbt_prim_tagsize(u8 tag); +atrb_const int nbt_primsize(u8 tag);