From 2451d7d57ed354aa3721153af417f06b2cebeec0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 12 Apr 2022 11:59:25 +1000 Subject: Cleanup: use _NUM suffix for space/region type ranges - Replace SPACE_TYPE_LAST with SPACE_TYPE_NUM (adding 1). - Rename RGN_TYPE_LEN to RGN_TYPE_NUM This makes it possible to tag space-type/region-type combinations with `bool tag[SPACE_TYPE_NUM][RGN_TYPE_NUM]` which reads more clearly than `bool tag[SPACE_TYPE_LAST + 1][RGN_TYPE_LEN]`. --- source/blender/makesdna/DNA_screen_types.h | 2 +- source/blender/makesdna/DNA_space_types.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index c1eee109630..8560f8a454e 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -664,7 +664,7 @@ typedef enum eRegion_Type { * context (surface, mirror view). Does not represent any real region. */ RGN_TYPE_XR = 13, -#define RGN_TYPE_LEN (RGN_TYPE_XR + 1) +#define RGN_TYPE_NUM (RGN_TYPE_XR + 1) } eRegion_Type; /* use for function args */ diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index bcf54ee47a0..1b70d8497b6 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -2057,7 +2057,7 @@ typedef enum eSpace_Type { SPACE_STATUSBAR = 22, SPACE_SPREADSHEET = 23 -#define SPACE_TYPE_LAST SPACE_SPREADSHEET +#define SPACE_TYPE_NUM (SPACE_SPREADSHEET + 1) } eSpace_Type; /* use for function args */ -- cgit v1.2.3