From 9b89de2571b0c3fa2276b5c2ae589e0ec831d1f5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 3 Jul 2021 23:08:40 +1000 Subject: Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXX Also use doxy style function reference `#` prefix chars when referencing identifiers. --- source/blender/makesdna/DNA_ID.h | 6 +++--- source/blender/makesdna/DNA_action_types.h | 4 ++-- source/blender/makesdna/DNA_curve_types.h | 2 +- source/blender/makesdna/DNA_defs.h | 2 +- source/blender/makesdna/DNA_modifier_types.h | 2 +- source/blender/makesdna/DNA_node_types.h | 2 +- source/blender/makesdna/DNA_object_types.h | 4 ++-- source/blender/makesdna/DNA_outliner_types.h | 2 +- source/blender/makesdna/DNA_scene_types.h | 4 ++-- source/blender/makesdna/DNA_screen_types.h | 7 ++++--- source/blender/makesdna/DNA_space_types.h | 2 +- source/blender/makesdna/DNA_texture_types.h | 8 +++++--- source/blender/makesdna/DNA_userdef_types.h | 2 +- source/blender/makesdna/DNA_vfont_types.h | 2 +- source/blender/makesdna/DNA_windowmanager_types.h | 2 +- source/blender/makesdna/DNA_workspace_types.h | 2 +- source/blender/makesdna/intern/dna_genfile.c | 4 ++-- source/blender/makesdna/intern/makesdna.c | 4 ++-- 18 files changed, 32 insertions(+), 29 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 15a4f8817fd..c9d652ad03d 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -62,7 +62,7 @@ typedef struct DrawDataList { typedef struct IDPropertyData { void *pointer; ListBase group; - /** Note, we actually fit a double into these two ints. */ + /** NOTE: we actually fit a double into these two 32bit integers. */ int val, val2; } IDPropertyData; @@ -76,7 +76,7 @@ typedef struct IDProperty { /* saved is used to indicate if this struct has been saved yet. * seemed like a good idea as a '_pad' var was needed anyway :) */ int saved; - /** Note, alignment for 64 bits. */ + /** NOTE: alignment for 64 bits. */ IDPropertyData data; /* Array length, also (this is important!) string length + 1. @@ -554,7 +554,7 @@ enum { * Also used internally in readfile.c to mark data-blocks needing do_versions. */ LIB_TAG_NEW = 1 << 8, /* RESET_BEFORE_USE free test flag. - * TODO make it a RESET_AFTER_USE too. */ + * TODO: make it a RESET_AFTER_USE too. */ LIB_TAG_DOIT = 1 << 10, /* RESET_AFTER_USE tag existing data before linking so we know what is new. */ LIB_TAG_PRE_EXISTING = 1 << 11, diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index b6ffefb55e0..c10788bff92 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -419,7 +419,7 @@ typedef enum ePchan_DrawFlag { PCHAN_DRAW_NO_CUSTOM_BONE_SIZE = (1 << 0), } ePchan_DrawFlag; -/* Note: It doesn't take custom_scale_xyz into account */ +/* NOTE: It doesn't take custom_scale_xyz into account. */ #define PCHAN_CUSTOM_BONE_LENGTH(pchan) \ (((pchan)->drawflag & PCHAN_DRAW_NO_CUSTOM_BONE_SIZE) ? 1.0f : (pchan)->bone->length) @@ -602,7 +602,7 @@ typedef struct bActionGroup { struct bActionGroup *next, *prev; /** - * Note: this must not be touched by standard listbase functions + * NOTE: this must not be touched by standard listbase functions * which would clear links to other channels. */ ListBase channels; diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index f6242679808..3732de6c0ec 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -598,7 +598,7 @@ typedef enum eBezTriple_KeyframeType { /* CharInfo.flag */ enum { - /* note: CU_CHINFO_WRAP, CU_CHINFO_SMALLCAPS_TEST and CU_CHINFO_TRUNCATE are set dynamically */ + /* NOTE: CU_CHINFO_WRAP, CU_CHINFO_SMALLCAPS_TEST and CU_CHINFO_TRUNCATE are set dynamically. */ CU_CHINFO_BOLD = 1 << 0, CU_CHINFO_ITALIC = 1 << 1, CU_CHINFO_UNDERLINE = 1 << 2, diff --git a/source/blender/makesdna/DNA_defs.h b/source/blender/makesdna/DNA_defs.h index 01ee954d0d2..ef476f21458 100644 --- a/source/blender/makesdna/DNA_defs.h +++ b/source/blender/makesdna/DNA_defs.h @@ -31,7 +31,7 @@ # ifdef __GNUC__ # define DNA_DEPRECATED __attribute__((deprecated)) # else -/* TODO, msvc & others */ +/* TODO: MSVC & others. */ # define DNA_DEPRECATED # endif # endif diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index dfe49452636..08a38f0652c 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -1840,7 +1840,7 @@ typedef struct CorrectiveSmoothModifierData { * use for MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND */ float (*bind_coords)[3]; - /* note: -1 is used to bind */ + /* NOTE: -1 is used to bind. */ unsigned int bind_coords_num; float lambda, scale; diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index a6de85dd6af..6b9ef6a2e54 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -340,7 +340,7 @@ typedef struct bNode { #define NODE_TRANSFORM (1 << 13) /* node is active texture */ -/* note: take care with this flag since its possible it gets +/* NOTE: take care with this flag since its possible it gets * `stuck` inside/outside the active group - which makes buttons * window texture not update, we try to avoid it by clearing the * flag when toggling group editing - Campbell */ diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 26a1bea4b3a..7050ba4b939 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -380,9 +380,9 @@ typedef struct Object { /** Custom index, for renderpasses. */ short index; - /** Current deformation group, note: index starts at 1. */ + /** Current deformation group, NOTE: index starts at 1. */ unsigned short actdef; - /** Current face map, note: index starts at 1. */ + /** Current face map, NOTE: index starts at 1. */ unsigned short actfmap; char _pad2[2]; /** Object color (in most cases the material color is used for drawing). */ diff --git a/source/blender/makesdna/DNA_outliner_types.h b/source/blender/makesdna/DNA_outliner_types.h index 7a39e0caef3..ebf3d4a248c 100644 --- a/source/blender/makesdna/DNA_outliner_types.h +++ b/source/blender/makesdna/DNA_outliner_types.h @@ -106,7 +106,7 @@ typedef enum eTreeStoreElemType { TSE_R_LAYER = 20, /* TSE_R_PASS = 21, */ /* UNUSED */ /* TSE_LINKED_MAT = 22, */ - /* NOTE, is used for light group */ + /* NOTE: is used for light group. */ /* TSE_LINKED_LAMP = 23, */ TSE_POSEGRP_BASE = 24, TSE_POSEGRP = 25, diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index d40de4184b6..5fc6cdf58a3 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -25,7 +25,7 @@ #include "DNA_defs.h" -/* XXX, temp feature - campbell */ +/* XXX(campbell): temp feature. */ #define DURIAN_CAMERA_SWITCH /* check for cyclic set-scene, @@ -397,7 +397,7 @@ typedef enum eStereo3dInterlaceType { /* Generic image format settings, * this is used for NodeImageFile and IMAGE_OT_save_as operator too. * - * note: its a bit strange that even though this is an image format struct + * NOTE: its a bit strange that even though this is an image format struct * the imtype can still be used to select video formats. * RNA ensures these enum's are only selectable for render output. */ diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index ce25f8e40b7..670e84e0c7a 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -47,19 +47,20 @@ struct wmDrawBuffer; struct wmTimer; struct wmTooltipState; -/* TODO Doing this is quite ugly :) +/* TODO: Doing this is quite ugly :) * Once the top-bar is merged bScreen should be refactored to use ScrAreaMap. */ #define AREAMAP_FROM_SCREEN(screen) ((ScrAreaMap *)&(screen)->vertbase) typedef struct bScreen { ID id; - /* TODO Should become ScrAreaMap now. - * ** NOTE: KEEP ORDER IN SYNC WITH ScrAreaMap! (see AREAMAP_FROM_SCREEN macro above) ** */ + /* TODO: Should become ScrAreaMap now. + * NOTE: KEEP ORDER IN SYNC WITH #ScrAreaMap! (see AREAMAP_FROM_SCREEN macro above). */ /** Screens have vertices/edges to define areas. */ ListBase vertbase; ListBase edgebase; ListBase areabase; + /* End variables that must be in sync with #ScrAreaMap. */ /** Screen level regions (menus), runtime only. */ ListBase regionbase; diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 5ee96497bd5..cb571277438 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -987,7 +987,7 @@ typedef enum eFileSel_Params_Flag { } eFileSel_Params_Flag; /* sfile->params->rename_flag */ -/* Note: short flag. Defined as bitflags, but currently only used as exclusive status markers... */ +/* NOTE: short flag. Defined as bitflags, but currently only used as exclusive status markers... */ typedef enum eFileSel_Params_RenameFlag { /** Used when we only have the name of the entry we want to rename, * but not yet access to its matching file entry. */ diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index 60c255e8637..2308f04c4c7 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -219,10 +219,12 @@ typedef struct Tex { } Tex; -/* used for mapping and texture nodes. note: rot is now in radians */ - +/** Used for mapping and texture nodes. */ typedef struct TexMapping { - float loc[3], rot[3], size[3]; + float loc[3]; + /** Rotation in radians. */ + float rot[3]; + float size[3]; int flag; char projx, projy, projz, mapping; int type; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 7abd960c467..629aa191890 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -261,7 +261,7 @@ typedef struct ThemeSpace { /** Region background. */ unsigned char execution_buts[4]; - /* note, cannot use name 'panel' because of DNA mapping old files */ + /* NOTE: cannot use name 'panel' because of DNA mapping old files. */ uiPanelColors panelcolors; unsigned char shade1[4]; diff --git a/source/blender/makesdna/DNA_vfont_types.h b/source/blender/makesdna/DNA_vfont_types.h index bc1a71102da..e782f7914b5 100644 --- a/source/blender/makesdna/DNA_vfont_types.h +++ b/source/blender/makesdna/DNA_vfont_types.h @@ -45,7 +45,7 @@ typedef struct VFont { struct PackedFile *packedfile; /* runtime only, holds memory for freetype to read from - * TODO, replace this with blf_font_new() style loading */ + * TODO: replace this with #blf_font_new() style loading. */ struct PackedFile *temp_pf; } VFont; diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index e4df420fb34..cb5c62e4507 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -553,7 +553,7 @@ enum { /* in case operator got executed outside WM code... like via fileselect */ OPERATOR_HANDLED = (1 << 4), /* used for operators that act indirectly (eg. popup menu) - * note: this isn't great design (using operators to trigger UI) avoid where possible. */ + * NOTE: this isn't great design (using operators to trigger UI) avoid where possible. */ OPERATOR_INTERFACE = (1 << 5), }; #define OPERATOR_FLAGS_ALL \ diff --git a/source/blender/makesdna/DNA_workspace_types.h b/source/blender/makesdna/DNA_workspace_types.h index c5c2351c718..0fce331fadf 100644 --- a/source/blender/makesdna/DNA_workspace_types.h +++ b/source/blender/makesdna/DNA_workspace_types.h @@ -165,7 +165,7 @@ typedef struct WorkSpaceDataRelation { /** The data used to identify the relation * (e.g. to find screen-layout (= value) from/for a hook). - * Note: Now runtime only. */ + * NOTE: Now runtime only. */ void *parent; /** The value for this parent-data/workspace relation. */ void *value; diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 2a4bf53702f..84a77e9553e 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -47,7 +47,7 @@ /** * \section dna_genfile Overview * - * - please note: no builtin security to detect input of double structs + * - please NOTE: no builtin security to detect input of double structs * - if you want a struct not to be in DNA file: add two hash marks above it `(##)`. * * Structure DNA data is added to each blender file and to each executable, this to detect @@ -1060,7 +1060,7 @@ void DNA_struct_switch_endian(const SDNA *sdna, int struct_nr, char *data) } case SDNA_TYPE_INT: case SDNA_TYPE_FLOAT: { - /* Note, intentionally ignore long/ulong, because these could be 4 or 8 bytes. + /* NOTE: intentionally ignore long/ulong, because these could be 4 or 8 bytes. * Fortunately, we only use these types for runtime variables and only once for a * struct type that is no longer used. */ BLI_endian_switch_int32_array((int32_t *)member_data, member_array_length); diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 24cfc1d84f6..5b08f2bf100 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -360,7 +360,7 @@ static int add_type(const char *str, int size) return -1; } if (strchr(str, '*')) { - /* note: this is valid C syntax but we can't parse, complain! + /* NOTE: this is valid C syntax but we can't parse, complain! * `struct SomeStruct* some_var;` <-- correct but we can't handle right now. */ return -1; } @@ -567,7 +567,7 @@ static short *add_struct(int namecode) static int preprocess_include(char *maindata, const int maindata_len) { - /* note: len + 1, last character is a dummy to prevent + /* NOTE: len + 1, last character is a dummy to prevent * comparisons using uninitialized memory */ char *temp = MEM_mallocN(maindata_len + 1, "preprocess_include"); temp[maindata_len] = ' '; -- cgit v1.2.3