Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <b.mont29@gmail.com>2020-02-13 14:56:10 +0300
committerBastien Montagne <b.mont29@gmail.com>2020-02-13 18:23:42 +0300
commitf28bb6992fa9773fb1e7918d569f4c88427f4c96 (patch)
treee69240c9ab26ba00bf4ca1f54636e4e837b8f465 /source/blender/blenkernel/intern/main.c
parent0d750d7c064bbb1e1fb5fe2ae14a8496863a890b (diff)
Refactor libquery ID looper callback to take a single parameter.
Using a struct here allows to change given parameters to the callbacks without having to edit all callbacks functions, which is always noisy and time consuming.
Diffstat (limited to 'source/blender/blenkernel/intern/main.c')
-rw-r--r--source/blender/blenkernel/intern/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/main.c b/source/blender/blenkernel/intern/main.c
index 0c17a2c0856..75bf74f63bf 100644
--- a/source/blender/blenkernel/intern/main.c
+++ b/source/blender/blenkernel/intern/main.c
@@ -209,12 +209,12 @@ void BKE_main_unlock(struct Main *bmain)
BLI_spin_unlock((SpinLock *)bmain->lock);
}
-static int main_relations_create_idlink_cb(void *user_data,
- ID *id_self,
- ID **id_pointer,
- int cb_flag)
+static int main_relations_create_idlink_cb(LibraryIDLinkCallbackData *cb_data)
{
- MainIDRelations *rel = user_data;
+ MainIDRelations *rel = cb_data->user_data;
+ ID *id_self = cb_data->id_self;
+ ID **id_pointer = cb_data->id_pointer;
+ const int cb_flag = cb_data->cb_flag;
if (*id_pointer) {
MainIDRelationsEntry *entry, **entry_p;