[Bf-blender-cvs] [f9d221db9cf] asset-browser-poselib: Cleanup: Minor code-style cleanup

Julian Eisel noreply at git.blender.org
Mon Jun 14 20:26:07 CEST 2021


Commit: f9d221db9cf207f04b3b6060b466cc2d9574bf8d
Author: Julian Eisel
Date:   Mon Jun 14 20:21:49 2021 +0200
Branches: asset-browser-poselib
https://developer.blender.org/rBf9d221db9cf207f04b3b6060b466cc2d9574bf8d

Cleanup: Minor code-style cleanup

===================================================================

M	source/blender/editors/armature/pose_lib_2.c
M	source/blender/editors/asset/asset_list.cc

===================================================================

diff --git a/source/blender/editors/armature/pose_lib_2.c b/source/blender/editors/armature/pose_lib_2.c
index bbb82424953..c35bb8d3cd5 100644
--- a/source/blender/editors/armature/pose_lib_2.c
+++ b/source/blender/editors/armature/pose_lib_2.c
@@ -57,8 +57,6 @@
 
 #include "armature_intern.h"
 
-struct ScrArea;
-
 typedef enum ePoseBlendState {
   POSE_BLEND_INIT,
   POSE_BLEND_BLENDING,
@@ -90,8 +88,8 @@ typedef struct PoseBlendData {
   bAction *act; /* Pose to blend into the current pose. */
   bool free_action;
 
-  Scene *scene;         /* For auto-keying. */
-  struct ScrArea *area; /* For drawing status text. */
+  Scene *scene;  /* For auto-keying. */
+  ScrArea *area; /* For drawing status text. */
 
   /** Info-text to print in header. */
   char headerstr[UI_MAX_DRAW_STR];
@@ -125,14 +123,13 @@ static void poselib_keytag_pose(bContext *C, Scene *scene, PoseBlendData *pbd)
 
   bPose *pose = pbd->ob->pose;
   bAction *act = pbd->act;
-  bActionGroup *agrp;
 
   KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_WHOLE_CHARACTER_ID);
   ListBase dsources = {NULL, NULL};
 
   /* start tagging/keying */
   const bArmature *armature = pbd->ob->data;
-  for (agrp = act->groups.first; agrp; agrp = agrp->next) {
+  LISTBASE_FOREACH (bActionGroup *, agrp, &act->groups) {
     /* only for selected bones unless there aren't any selected, in which case all are included  */
     bPoseChannel *pchan = BKE_pose_channel_find_name(pose, agrp->name);
     if (pchan == NULL) {
diff --git a/source/blender/editors/asset/asset_list.cc b/source/blender/editors/asset/asset_list.cc
index 8b57c0c5a60..1ea948d97d4 100644
--- a/source/blender/editors/asset/asset_list.cc
+++ b/source/blender/editors/asset/asset_list.cc
@@ -402,9 +402,7 @@ void AssetListStorage::fetch_library(const AssetLibraryReference &library_refere
     return;
   }
 
-  std::tuple list_create_info = ensure_list_storage(library_reference, *filesel_type);
-  AssetList &list = std::get<0>(list_create_info);
-  const bool is_new = std::get<1>(list_create_info);
+  auto [list, is_new] = ensure_list_storage(library_reference, *filesel_type);
   if (is_new || list.needsRefetch()) {
     list.setup(filter_settings);
     list.fetch(C);



More information about the Bf-blender-cvs mailing list