From 066e1c004923bc035eda5dec3178eda56600960f Mon Sep 17 00:00:00 2001 From: Quinn Date: Thu, 7 Aug 2025 12:08:48 +0200 Subject: [PATCH] remove `nbt_isprim` function, because it never really served any purpose.' --- src/dat/nbt.c | 14 -------------- src/dat/nbt.h | 4 ---- 2 files changed, 18 deletions(-) diff --git a/src/dat/nbt.c b/src/dat/nbt.c index db52bca..e7f5436 100644 --- a/src/dat/nbt.c +++ b/src/dat/nbt.c @@ -7,20 +7,6 @@ #include "../util/compat/endian.h" #include "../util/types.h" -int nbt_isprim(u8 tag) { - switch (tag) { - case NBT_I8: - case NBT_I16: - case NBT_I32: - case NBT_F32: - case NBT_I64: - case NBT_F64: - return 1; - default: - return 0; - } -} - int nbt_primsize(u8 tag) { switch (tag) { case NBT_I8: return 1; diff --git a/src/dat/nbt.h b/src/dat/nbt.h index e3941d2..9c9ebf8 100644 --- a/src/dat/nbt.h +++ b/src/dat/nbt.h @@ -44,10 +44,6 @@ struct nbt_path { /* gets the tag size of primitive types, returns `>0` on success, `<0` on failure */ CONST int nbt_primsize(u8 tag); -/* checks whether the tag is a primitive data tag. (not recommended for filtering tags, use a `switch`) - * returns a boolean value. */ -CONST int nbt_isprim(u8 tag); - /* searches for the end of a compound tag without processing data, the final pointer is returned. * `NULL` is returned upon failure, the otherwise returned pointer is not guaranteed to be valid. * `cdat` is assumed to be the start of the **compound tag's data**. */