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 <montagne29@wanadoo.fr>2015-10-15 17:04:04 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-10-15 17:12:00 +0300
commitfa3dd5d9f43253898ed2a387d07f8fd3cd52f0c6 (patch)
treede8ceba6aba70a7eb3a6b596cd09d2de37f35a2e /source/blender/windowmanager
parent25f79d97deb713fe8d0984f765529808986fbcee (diff)
Cleanup: BLO_read: linking API arg order and name.
linking API funcs would use 'name, idcode', when all other code here uses (more sensible) 'idcode, name'. Also, use 'name' arg name when we expect a bare name, without the prepended ID code, and 'idname' arg name when we expect a complete ID name. And here too, idcode shall be short, not int!
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 1245430f68b..5c2e1f859c8 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2629,7 +2629,7 @@ static short wm_link_append_flag(wmOperator *op)
typedef struct WMLinkAppendDataItem {
char *name;
BLI_bitmap *libraries; /* All libs (from WMLinkAppendData.libraries) to try to load this ID from. */
- int idcode;
+ short idcode;
ID *new_id;
void *customdata;
@@ -2675,7 +2675,7 @@ static void wm_link_append_data_library_add(WMLinkAppendData *lapp_data, const c
}
static WMLinkAppendDataItem *wm_link_append_data_item_add(
- WMLinkAppendData *lapp_data, const char *idname, const int idcode, void *customdata)
+ WMLinkAppendData *lapp_data, const char *idname, const short idcode, void *customdata)
{
WMLinkAppendDataItem *item = BLI_memarena_alloc(lapp_data->memarena, sizeof(*item));
size_t len = strlen(idname) + 1;
@@ -2742,7 +2742,7 @@ static void wm_link_do(
continue;
}
- new_id = BLO_library_link_named_part_ex(mainl, &bh, item->name, item->idcode, flag, scene, v3d);
+ new_id = BLO_library_link_named_part_ex(mainl, &bh, item->idcode, item->name, flag, scene, v3d);
if (new_id) {
/* If the link is sucessful, clear item's libs 'todo' flags.
* This avoids trying to link same item with other libraries to come. */