From a64196c2ce90364fc7986a771d1c856e06e27a3f Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 20 Nov 2022 01:26:57 +0100 Subject: [PATCH] [MIRROR] Cleans up a review mso left about list types [MDB IGNORE] (#17583) * Cleans up a review mso left about list types (#71090) ## About The Pull Request No sense trying to cache a list ref, it'll never work anyhow Also this is in ref tracking and I want that as fast as I humanly can make it * Cleans up a review mso left about list types Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> --- code/__DEFINES/typeids.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/typeids.dm b/code/__DEFINES/typeids.dm index 7c69dd29de3..eaf28bd1758 100644 --- a/code/__DEFINES/typeids.dm +++ b/code/__DEFINES/typeids.dm @@ -3,6 +3,8 @@ #define TYPEID_NORMAL_LIST "f" //helper macros #define GET_TYPEID(ref) ( ( (length(ref) <= 10) ? "TYPEID_NULL" : copytext(ref, 4, -7) ) ) -#define IS_NORMAL_LIST(L) (GET_TYPEID(text_ref(L)) == TYPEID_NORMAL_LIST) +// Only allowed raw ref, since this is for lists explicitly and they will get no use from it +// Also it tends to be used in a hot context so let's be nice yes? +#define IS_NORMAL_LIST(L) (GET_TYPEID("\ref[L]") == TYPEID_NORMAL_LIST)