From b8ad624006486556aadccbc05b234e1da40e5a67 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 12 Oct 2023 09:22:34 +1100 Subject: [PATCH] Cleanup: use doxygen doc-strings, spelling in comments --- intern/cycles/kernel/light/area.h | 2 +- intern/ghost/intern/GHOST_SystemCocoa.mm | 2 +- source/blender/blenkernel/intern/image.cc | 4 ++-- .../blender/blenkernel/intern/lib_override.cc | 6 ++--- .../blender/editors/include/UI_interface_c.hh | 24 ++++++++++++------- .../editors/interface/interface_handlers.cc | 2 +- source/blender/gpu/intern/gpu_viewport.cc | 4 ++-- 7 files changed, 26 insertions(+), 18 deletions(-) diff --git a/intern/cycles/kernel/light/area.h b/intern/cycles/kernel/light/area.h index 7a32b2495af..7d870fe15fc 100644 --- a/intern/cycles/kernel/light/area.h +++ b/intern/cycles/kernel/light/area.h @@ -48,7 +48,7 @@ ccl_device_inline float area_light_rect_sample(float3 P, /* The original paper uses acos() to compute the internal angles here, and then computes the * solid angle as their sum minus 2*pi. However, for very small rectangles, this results in * excessive cancellation error since the sum will be almost 2*pi as well. - * This can be avoided by using that asin(x) = pi/2 - acos(x). */ + * This can be avoided by using that `asin(x) = pi/2 - acos(x)`. */ float g0 = safe_asinf(-nz.x * nz.y); float g1 = safe_asinf(-nz.y * nz.z); float g2 = safe_asinf(-nz.z * nz.w); diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 8376075d037..650c3bd0698 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -473,7 +473,7 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) if (![closing_window isKeyWindow]) { /* If the window wasn't key then its either none of the windows are key or another window - * is a key. The former situation is a bit strange, but probably forcin a key window is not + * is a key. The former situation is a bit strange, but probably forcing a key window is not * something desirable. The latter situation is when we definitely do not want to change the * key window. * diff --git a/source/blender/blenkernel/intern/image.cc b/source/blender/blenkernel/intern/image.cc index 0d6ae2fe489..d3c90475b55 100644 --- a/source/blender/blenkernel/intern/image.cc +++ b/source/blender/blenkernel/intern/image.cc @@ -4387,8 +4387,8 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **r_loc /* Put an empty image buffer to the cache. This allows to achieve the following: * - * 1. It makes it so the generic logic in the #BKE_image_has_loaded_ibuf proeprly detects that - * an Image used to dusplay render result has loaded image buffer. + * 1. It makes it so the generic logic in the #BKE_image_has_loaded_ibuf properly detects that + * an Image used to display render result has loaded image buffer. * * Surely there are all the design questions about scene-dependent Render Result image * data-block, and the behavior of the flag dependent on whether the Render Result image was ever diff --git a/source/blender/blenkernel/intern/lib_override.cc b/source/blender/blenkernel/intern/lib_override.cc index a97092b8b7e..12e03ae223a 100644 --- a/source/blender/blenkernel/intern/lib_override.cc +++ b/source/blender/blenkernel/intern/lib_override.cc @@ -1575,12 +1575,12 @@ static ID *lib_override_root_find(Main *bmain, ID *id, const int curr_level, int } if (entry->tags & MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS) { - /* Re-processing an entry already being processed higher in the callgraph (re-entry caused by a - * dependency loops). Just do nothing, there is no more usefull info to provide here. */ + /* Re-processing an entry already being processed higher in the call-graph (re-entry caused by + * a dependency loops). Just do nothing, there is no more useful info to provide here. */ return nullptr; } /* Flag this entry to avoid re-processing it in case some dependency loop leads to it again - * downwards in the callstack. */ + * downwards in the call-stack. */ entry->tags |= MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS; int best_level_candidate = curr_level; diff --git a/source/blender/editors/include/UI_interface_c.hh b/source/blender/editors/include/UI_interface_c.hh index 0c6d69138af..61feb011bcc 100644 --- a/source/blender/editors/include/UI_interface_c.hh +++ b/source/blender/editors/include/UI_interface_c.hh @@ -118,17 +118,21 @@ struct uiViewItemHandle; /** #uiBlock.emboss and #uiBut.emboss */ enum eUIEmbossType { - UI_EMBOSS = 0, /* use widget style for drawing */ - UI_EMBOSS_NONE = 1, /* Nothing, only icon and/or text */ - UI_EMBOSS_PULLDOWN = 2, /* Pull-down menu style */ - UI_EMBOSS_RADIAL = 3, /* Pie Menu */ + /** Use widget style for drawing. */ + UI_EMBOSS = 0, + /** Nothing, only icon and/or text */ + UI_EMBOSS_NONE = 1, + /** Pull-down menu style */ + UI_EMBOSS_PULLDOWN = 2, + /** Pie Menu */ + UI_EMBOSS_RADIAL = 3, /** * The same as #UI_EMBOSS_NONE, unless the button has * a coloring status like an animation state or red alert. */ UI_EMBOSS_NONE_OR_STATUS = 4, - - UI_EMBOSS_UNDEFINED = 255, /* For layout engine, use emboss from block. */ + /** For layout engine, use emboss from block. */ + UI_EMBOSS_UNDEFINED = 255, }; /** #uiBlock::direction */ @@ -2834,7 +2838,11 @@ void uiItemPointerR(uiLayout *layout, const char *name, int icon); -/* Create a list of enum items. Active is an optional item to highlight. */ +/** +* Create a list of enum items. + + * \param active: an optional item to highlight. +*/ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname, @@ -2846,7 +2854,7 @@ void uiItemsFullEnumO(uiLayout *layout, * Create UI items for enum items in \a item_array. * * A version of #uiItemsFullEnumO that takes pre-calculated item array. - * active, if not -1, will highlight that item. + * \param active: if not -1, will highlight that item. */ void uiItemsFullEnumO_items(uiLayout *layout, wmOperatorType *ot, diff --git a/source/blender/editors/interface/interface_handlers.cc b/source/blender/editors/interface/interface_handlers.cc index dc20d604b50..7debac09905 100644 --- a/source/blender/editors/interface/interface_handlers.cc +++ b/source/blender/editors/interface/interface_handlers.cc @@ -10315,7 +10315,7 @@ float ui_block_calc_pie_segment(uiBlock *block, const float event_xy[2]) static int ui_handle_menu_letter_press(uiPopupBlockHandle *menu) { - /* Start menu search on spacebar press if the menu has a name. */ + /* Start menu search on space-bar press if the menu has a name. */ if (menu->menu_idname[0]) { uiAfterFunc *after = ui_afterfunc_new(); wmOperatorType *ot = WM_operatortype_find("WM_OT_search_single_menu", false); diff --git a/source/blender/gpu/intern/gpu_viewport.cc b/source/blender/gpu/intern/gpu_viewport.cc index 6c53892583b..4b922e25de1 100644 --- a/source/blender/gpu/intern/gpu_viewport.cc +++ b/source/blender/gpu/intern/gpu_viewport.cc @@ -159,10 +159,10 @@ static void gpu_viewport_textures_create(GPUViewport *viewport) } } - /* Can be shared with GPUOffscreen. */ + /* Can be shared with #GPUOffscreen. */ if (viewport->depth_tx == nullptr) { /* Depth texture can be read back by gizmos #view3d_depths_create. */ - /* Swizle flag is needed by Workbench Volumes to read the stencil view. */ + /* Swizzle flag is needed by Workbench Volumes to read the stencil view. */ viewport->depth_tx = GPU_texture_create_2d("dtxl_depth", UNPACK2(size), 1,