Cleanup: comments

This commit is contained in:
Campbell Barton 2021-03-06 13:03:30 +11:00
parent f117ea2624
commit 3bc406274b
6 changed files with 14 additions and 13 deletions

View File

@ -1380,9 +1380,9 @@ static void update_vertex_normals_when_dirty(const GeometryComponent &component)
return;
}
/* Since normals are derived data, const write access to them is okay. However, ensure that
/* Since normals are derived data, `const` write access to them is okay. However, ensure that
* two threads don't use write normals to a mesh at the same time. Note that this relies on
* the idempotence of the operation; calculating the normals just fills the MVert struct
* the idempotence of the operation; calculating the normals just fills the #MVert struct
* rather than allocating new memory. */
if (mesh->runtime.cd_dirty_vert & CD_MASK_NORMAL) {
ThreadMutex *mesh_eval_mutex = (ThreadMutex *)mesh->runtime.eval_mutex;

View File

@ -3684,7 +3684,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (!MAIN_VERSION_ATLEAST(bmain, 280, 48)) {
for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
/* Those are not currently used, but are accessible through RNA API and were not
* properly initialized previously. This is mere copy of BKE_init_scene() code. */
* properly initialized previously. This is mere copy of #scene_init_data code. */
if (scene->r.im_format.view_settings.look[0] == '\0') {
BKE_color_managed_display_settings_init(&scene->r.im_format.display_settings);
BKE_color_managed_view_settings_init_render(

View File

@ -32,7 +32,7 @@ class TreeElementID : public AbstractTreeElement {
/**
* Expanding not implemented for all types yet. Once it is, this can be set to true or
* `AbstractTreeElement::expandValid()` can be removed alltogether.
* `AbstractTreeElement::expandValid()` can be removed altogether.
*/
bool isExpandValid() const override
{

View File

@ -4598,13 +4598,12 @@ static PyObject *pyrna_prop_collection_getattro(BPy_PropertyRNA *self, PyObject
#else
{
/* Could just do this except for 1 awkward case.
* PyObject_GenericGetAttr((PyObject *)self, pyname);
* so as to support 'bpy.data.library.load()'
* note, this _only_ supports static methods */
* `PyObject_GenericGetAttr((PyObject *)self, pyname);`
* so as to support `bpy.data.library.load()` */
PyObject *ret = PyObject_GenericGetAttr((PyObject *)self, pyname);
if (ret == NULL && name[0] != '_') { /* Avoid inheriting __call__ and similar. */
if (ret == NULL && name[0] != '_') { /* Avoid inheriting `__call__` and similar. */
/* Since this is least common case, handle it last. */
PointerRNA r_ptr;
if (RNA_property_collection_type_get(&self->ptr, self->prop, &r_ptr)) {

View File

@ -43,7 +43,9 @@
#define WM_PLATFORM_SUPPORT_TEXT_SIZE 1024
/* Check if user has already approved the given platform_support_key. */
/**
* Check if user has already approved the given `platform_support_key`.
*/
static bool wm_platform_support_check_approval(const char *platform_support_key, bool update)
{
const char *const cfgdir = BKE_appdir_folder_id(BLENDER_USER_CONFIG, NULL);
@ -120,11 +122,11 @@ bool WM_platform_support_perform_checks()
eGPUSupportLevel support_level = GPU_platform_support_level();
const char *platform_key = GPU_platform_support_level_key();
/* check if previous check matches the current check. Don't update the approval when running in
* `background`. this could have been triggered by installing addons via installers. */
/* Check if previous check matches the current check. Don't update the approval when running in
* `background`. this could have been triggered by installing add-ons via installers. */
if (support_level != GPU_SUPPORT_LEVEL_UNSUPPORTED && !G.factory_startup &&
wm_platform_support_check_approval(platform_key, !G.background)) {
/* if it matches the user has confirmed and whishes to use it */
/* If it matches the user has confirmed and wishes to use it. */
return result;
}

View File

@ -1149,7 +1149,7 @@ static const char arg_handle_env_system_set_doc_python[] =
static int arg_handle_env_system_set(int argc, const char **argv, void *UNUSED(data))
{
/* "--env-system-scripts" --> "BLENDER_SYSTEM_SCRIPTS" */
/* `--env-system-scripts` -> `BLENDER_SYSTEM_SCRIPTS` */
char env[64] = "BLENDER";
char *ch_dst = env + 7; /* skip BLENDER */