Docs: remove references to "above" in code comments & corrections
Reference identifiers instead of "above" in code comments as these tends to become outdated. Even when declarations are removed it's at least clear that the reference no longer exists instead of referring to whatever is currently above the declaration. It's also straightforward to search history for a removed identifier. Corrected 4 cases of references to things that were no longer above the doc-strings. Noticed other references which look to be incorrect but need further investigation.
This commit is contained in:
@@ -35,7 +35,7 @@ struct BakeState {
|
||||
Map<int, std::unique_ptr<BakeItem>> items_by_id;
|
||||
};
|
||||
|
||||
/** Same as above, but does not own the bake items. */
|
||||
/** Same as #BakeState, but does not own the bake items. */
|
||||
struct BakeStateRef {
|
||||
Map<int, const BakeItem *> items_by_id;
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ void CustomData_reset(CustomData *data);
|
||||
void CustomData_free(CustomData *data, int totelem);
|
||||
|
||||
/**
|
||||
* Same as above, but only frees layers which matches the given mask.
|
||||
* Same as #CustomData_free, but only frees layers which matches the given mask.
|
||||
*/
|
||||
void CustomData_free_typemask(CustomData *data, int totelem, eCustomDataMask mask);
|
||||
|
||||
@@ -258,7 +258,7 @@ const void *CustomData_add_layer_with_data(CustomData *data,
|
||||
const blender::ImplicitSharingInfo *sharing_info);
|
||||
|
||||
/**
|
||||
* Same as above but accepts a name.
|
||||
* Same as #CustomData_add_layer but accepts a name.
|
||||
*/
|
||||
void *CustomData_add_layer_named(CustomData *data,
|
||||
eCustomDataType type,
|
||||
@@ -304,7 +304,7 @@ bool CustomData_free_layer_named(CustomData *data, blender::StringRef name, cons
|
||||
bool CustomData_free_layer_active(CustomData *data, eCustomDataType type, int totelem);
|
||||
|
||||
/**
|
||||
* Same as above, but free all layers with type.
|
||||
* Same as #CustomData_free_layer_active, but free all layers with type.
|
||||
*/
|
||||
void CustomData_free_layers(CustomData *data, eCustomDataType type, int totelem);
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ FCurve *BKE_fcurve_find_by_rna(PointerRNA *ptr,
|
||||
bool *r_driven,
|
||||
bool *r_special);
|
||||
/**
|
||||
* Same as above, but takes a context data,
|
||||
* Same as #BKE_fcurve_find_by_rna, but takes a context data,
|
||||
* temp hack needed for complex paths like texture ones.
|
||||
*
|
||||
* \param r_special: Optional, ignored when NULL. Set to `true` if the given RNA `ptr` is a NLA
|
||||
|
||||
@@ -178,7 +178,7 @@ void IDP_FreeFromGroup(IDProperty *group, IDProperty *prop) ATTR_NONNULL();
|
||||
IDProperty *IDP_GetPropertyFromGroup(const IDProperty *prop,
|
||||
const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
|
||||
/**
|
||||
* Same as above but ensure type match.
|
||||
* Same as #IDP_GetPropertyFromGroup but ensure the `type` matches.
|
||||
*/
|
||||
IDProperty *IDP_GetPropertyTypeFromGroup(const IDProperty *prop,
|
||||
const char *name,
|
||||
|
||||
@@ -341,7 +341,7 @@ void BKE_image_all_free_anim_ibufs(struct Main *bmain, int cfra);
|
||||
|
||||
void BKE_image_free_all_gputextures(struct Main *bmain);
|
||||
/**
|
||||
* Same as above but only free animated images.
|
||||
* Same as #BKE_image_free_all_gputextures but only free animated images.
|
||||
*/
|
||||
void BKE_image_free_anim_gputextures(struct Main *bmain);
|
||||
void BKE_image_free_old_gputextures(struct Main *bmain);
|
||||
|
||||
@@ -662,17 +662,18 @@ void nodeAttachNode(bNodeTree *ntree, bNode *node, bNode *parent);
|
||||
void nodeDetachNode(bNodeTree *ntree, bNode *node);
|
||||
|
||||
/**
|
||||
* Same as above but expects that the socket definitely is in the node tree.
|
||||
* Finds a node based on given socket and returns true on success.
|
||||
*/
|
||||
bool nodeFindNodeTry(bNodeTree *ntree, bNodeSocket *sock, bNode **r_node, int *r_sockindex);
|
||||
|
||||
/**
|
||||
* Same as #nodeFindNodeTry but expects that the socket definitely is in the node tree.
|
||||
*/
|
||||
void nodeFindNode(bNodeTree *ntree, bNodeSocket *sock, bNode **r_node, int *r_sockindex);
|
||||
/**
|
||||
* Finds a node based on its name.
|
||||
*/
|
||||
bNode *nodeFindNodebyName(bNodeTree *ntree, const char *name);
|
||||
/**
|
||||
* Finds a node based on given socket and returns true on success.
|
||||
*/
|
||||
bool nodeFindNodeTry(bNodeTree *ntree, bNodeSocket *sock, bNode **r_node, int *r_sockindex);
|
||||
|
||||
bool nodeIsParentAndChild(const bNode *parent, const bNode *child);
|
||||
|
||||
|
||||
@@ -507,7 +507,8 @@ Mesh *BKE_object_get_evaluated_mesh_no_subsurf(const Object *object);
|
||||
/** Get evaluated mesh for given object. */
|
||||
Mesh *BKE_object_get_evaluated_mesh(const Object *object);
|
||||
/**
|
||||
* Same as above, but does not check if the object's geometry is fully evaluated already.
|
||||
* Same as #BKE_object_get_evaluated_mesh, but does not check
|
||||
* if the object's geometry is fully evaluated already.
|
||||
* This should barely ever be used.
|
||||
*/
|
||||
Mesh *BKE_object_get_evaluated_mesh_no_subsurf_unchecked(const Object *object);
|
||||
|
||||
@@ -801,7 +801,7 @@ bool BLI_ghash_remove(GHash *gh,
|
||||
|
||||
void *BLI_ghash_popkey(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp)
|
||||
{
|
||||
/* Same as above but return the value,
|
||||
/* Same as #BLI_ghash_remove but return the value,
|
||||
* no free value argument since it will be returned. */
|
||||
|
||||
const uint hash = ghash_keyhash(gh, key);
|
||||
|
||||
@@ -110,7 +110,7 @@ TEST(ghash, InsertRemove)
|
||||
BLI_ghash_free(ghash, nullptr, nullptr);
|
||||
}
|
||||
|
||||
/* Same as above, but this time we allow ghash to shrink. */
|
||||
/* Same as `InsertRemove`, but this time we allow ghash to shrink. */
|
||||
TEST(ghash, InsertRemoveShrink)
|
||||
{
|
||||
GHash *ghash = BLI_ghash_new(BLI_ghashutil_inthash_p, BLI_ghashutil_intcmp, __func__);
|
||||
|
||||
@@ -124,7 +124,7 @@ Depsgraph *DEG_get_depsgraph_by_id(const ID &id);
|
||||
bool DEG_is_original_id(const ID *id);
|
||||
bool DEG_is_original_object(const Object *object);
|
||||
|
||||
/* Opposite of the above.
|
||||
/* Opposite of the above (`DEG_is_original_*`).
|
||||
*
|
||||
* If the data-block is not original it must be evaluated, and vice versa. */
|
||||
|
||||
@@ -156,10 +156,16 @@ bool DEG_id_is_fully_evaluated(const Depsgraph *depsgraph, const ID *id_eval);
|
||||
*/
|
||||
bool DEG_object_geometry_is_evaluated(const Object &object);
|
||||
|
||||
/** Same as above but for the transformation of the object. */
|
||||
/**
|
||||
* Same as #DEG_object_geometry_is_evaluated
|
||||
* but for the transformation of the object.
|
||||
*/
|
||||
bool DEG_object_transform_is_evaluated(const Object &object);
|
||||
|
||||
/** Same as above but for the geometry of all objects in the collection. */
|
||||
/**
|
||||
* Same as #DEG_object_geometry_is_evaluated
|
||||
* but for the geometry of all objects in the collection.
|
||||
*/
|
||||
bool DEG_collection_geometry_is_evaluated(const Collection &collection);
|
||||
|
||||
/** \} */
|
||||
|
||||
@@ -309,7 +309,7 @@ short ANIM_animchannel_keyframes_loop(KeyframeEditData *ked,
|
||||
KeyframeEditFunc key_cb,
|
||||
FcuEditFunc fcu_cb);
|
||||
/**
|
||||
* Same as above, except bAnimListElem wrapper is not needed.
|
||||
* Same as #ANIM_animchannel_keyframes_loop, except #bAnimListElem wrapper is not needed.
|
||||
* \param keytype: is #eAnim_KeyType.
|
||||
*/
|
||||
short ANIM_animchanneldata_keyframes_loop(KeyframeEditData *ked,
|
||||
|
||||
@@ -3190,7 +3190,7 @@ void UI_fontstyle_draw(const uiFontStyle *fs,
|
||||
const uchar col[4],
|
||||
const uiFontStyleDraw_Params *fs_params);
|
||||
/**
|
||||
* Drawn same as above, but at 90 degree angle.
|
||||
* Drawn same as #UI_fontstyle_draw, but at 90 degree angle.
|
||||
*/
|
||||
void UI_fontstyle_draw_rotated(const uiFontStyle *fs,
|
||||
const rcti *rect,
|
||||
|
||||
@@ -367,7 +367,8 @@ bool UI_view2d_view_to_region_rcti_clip(const View2D *v2d, const rctf *rect_src,
|
||||
*/
|
||||
View2D *UI_view2d_fromcontext(const bContext *C);
|
||||
/**
|
||||
* Same as above, but it returns region-window. Utility for pull-downs or buttons.
|
||||
* Same as #UI_view2d_fromcontext, but it returns region-window.
|
||||
* Utility for pull-downs or buttons.
|
||||
*/
|
||||
View2D *UI_view2d_fromcontext_rwin(const bContext *C);
|
||||
|
||||
|
||||
@@ -2337,7 +2337,9 @@ static void rect_to_uvspace_ortho(const rctf *bucket_bounds,
|
||||
interp_v2_v2v2v2(bucket_bounds_uv[flip ? 0 : 3], uv1co, uv2co, uv3co, w);
|
||||
}
|
||||
|
||||
/* same as above but use barycentric_weights_v2_persp */
|
||||
/**
|
||||
* Same as #rect_to_uvspace_ortho but use #barycentric_weights_v2_persp.
|
||||
*/
|
||||
static void rect_to_uvspace_persp(const rctf *bucket_bounds,
|
||||
const float *v1coSS,
|
||||
const float *v2coSS,
|
||||
|
||||
@@ -1277,7 +1277,7 @@ static void view3d_main_region_listener(const wmRegionListenerParams *params)
|
||||
ED_region_tag_redraw(region);
|
||||
break;
|
||||
case NC_TEXTURE:
|
||||
/* same as above */
|
||||
/* Same as #NC_IMAGE. */
|
||||
ED_region_tag_redraw(region);
|
||||
break;
|
||||
case NC_MOVIECLIP:
|
||||
|
||||
@@ -187,7 +187,7 @@ enum {
|
||||
* option enabled and rotating also transforms it.
|
||||
*/
|
||||
TD_PBONE_LOCAL_MTX_P = 1 << 17,
|
||||
/** Same as above but for a child bone. */
|
||||
/** Same as #TD_PBONE_LOCAL_MTX_P but for a child bone. */
|
||||
TD_PBONE_LOCAL_MTX_C = 1 << 18,
|
||||
/* Grease pencil layer frames. */
|
||||
TD_GREASE_PENCIL_FRAME = 1 << 19,
|
||||
|
||||
@@ -163,7 +163,7 @@ static bool depth_buf_subrect_depth_any_filled(const DepthBufCache *rect_src,
|
||||
const DepthBufCache *rect_dst,
|
||||
const SubRectStride *sub_rect)
|
||||
{
|
||||
/* Same as above but different rectangle sizes. */
|
||||
/* Same as #depth_buf_rect_depth_any_filled but different rectangle sizes. */
|
||||
const depth_t *prev = rect_src->buf + sub_rect->start;
|
||||
const depth_t *curr = rect_dst->buf + sub_rect->start;
|
||||
for (uint i = 0; i < sub_rect->span_len; i++) {
|
||||
|
||||
@@ -2046,7 +2046,7 @@ typedef struct Scene {
|
||||
* only used by #BKE_object_handle_update()
|
||||
*/
|
||||
struct CustomData_MeshMasks customdata_mask;
|
||||
/** XXX: same as above but for temp operator use (viewport renders). */
|
||||
/** XXX: same as `customdata_mask` but for temp operator use (viewport renders). */
|
||||
struct CustomData_MeshMasks customdata_mask_modal;
|
||||
|
||||
/* Color Management. */
|
||||
|
||||
@@ -195,7 +195,7 @@ PropertyRNA *RNA_def_enum(StructOrFunctionRNA *cont,
|
||||
const char *ui_name,
|
||||
const char *ui_description);
|
||||
/**
|
||||
* Same as above but sets #PROP_ENUM_FLAG before setting the default value.
|
||||
* Same as #RNA_def_enum but sets #PROP_ENUM_FLAG before setting the default value.
|
||||
*/
|
||||
PropertyRNA *RNA_def_enum_flag(StructOrFunctionRNA *cont,
|
||||
const char *identifier,
|
||||
|
||||
@@ -1065,7 +1065,7 @@ static void rna_RegionView3D_quadview_update(Main * /*main*/, Scene * /*scene*/,
|
||||
}
|
||||
}
|
||||
|
||||
/* same as above but call clip==true */
|
||||
/** Same as #rna_RegionView3D_quadview_update but call `clip == true`. */
|
||||
static void rna_RegionView3D_quadview_clip_update(Main * /*main*/,
|
||||
Scene * /*scene*/,
|
||||
PointerRNA *ptr)
|
||||
|
||||
@@ -1422,7 +1422,7 @@ static size_t max_memory_in_megabytes()
|
||||
return (limit_bytes >> 20);
|
||||
}
|
||||
|
||||
/* Same as above, but clipped to int capacity. */
|
||||
/* Same as #max_memory_in_megabytes, but clipped to int capacity. */
|
||||
static int max_memory_in_megabytes_int()
|
||||
{
|
||||
const size_t limit_megabytes = max_memory_in_megabytes();
|
||||
|
||||
@@ -60,8 +60,9 @@ struct OutputCopy {
|
||||
};
|
||||
|
||||
/**
|
||||
* Same as above, but the values can be output by move, instead of copy. This can reduce the amount
|
||||
* of unnecessary copies, when the old simulation state is not needed anymore.
|
||||
* Same as #OutputCopy, but the values can be output by move, instead of copy.
|
||||
* This can reduce the amount of unnecessary copies,
|
||||
* when the old simulation state is not needed anymore.
|
||||
*/
|
||||
struct OutputMove {
|
||||
float delta_time;
|
||||
|
||||
@@ -96,9 +96,9 @@ typedef int (*BaseMathCheckFunc)(BaseMathObject *);
|
||||
typedef int (*BaseMathGetFunc)(BaseMathObject *, int);
|
||||
/** Sets the users vector values once its modified. */
|
||||
typedef int (*BaseMathSetFunc)(BaseMathObject *, int);
|
||||
/** Same as above but only for an index. */
|
||||
/** Same as #BaseMathGetFunc but only for an index. */
|
||||
typedef int (*BaseMathGetIndexFunc)(BaseMathObject *, int, int);
|
||||
/** Same as above but only for an index. */
|
||||
/** Same as #BaseMathSetFunc but only for an index. */
|
||||
typedef int (*BaseMathSetIndexFunc)(BaseMathObject *, int, int);
|
||||
|
||||
struct Mathutils_Callback {
|
||||
|
||||
Reference in New Issue
Block a user