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:
authorJoshua Leung <aligorith@gmail.com>2014-05-22 07:46:51 +0400
committerJoshua Leung <aligorith@gmail.com>2014-05-22 07:46:51 +0400
commit6ce67a8eab884c69837381fb55f6ec86d5614cef (patch)
treeeffd23f228839759f77c4e099df98e25841f69a6 /source/blender/editors/animation/anim_filter.c
parent5f70f8b2b4aebb9341edbd774c1b8c23114d8be0 (diff)
For increased type safety, ANIM_animdata_filter() now specifies the enums its arguments can use
Hopefully this should help prevent bugs lik T40304 from occurring again.
Diffstat (limited to 'source/blender/editors/animation/anim_filter.c')
-rw-r--r--source/blender/editors/animation/anim_filter.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 6c28d05110f..b80e29ba424 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -2619,7 +2619,7 @@ static size_t animdata_filter_remove_duplis(ListBase *anim_data)
* will be placed for use.
* filter_mode: how should the data be filtered - bitmapping accessed flags
*/
-size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, int filter_mode, void *data, short datatype)
+size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, eAnimFilter_Flags filter_mode, void *data, eAnimCont_Types datatype)
{
size_t items = 0;
@@ -2712,6 +2712,13 @@ size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, int filter_mo
items = animdata_filter_animchan(ac, anim_data, ads, data, filter_mode);
break;
}
+
+ /* unhandled */
+ default:
+ {
+ printf("ANIM_animdata_filter() - Invalid datatype argument %d\n", datatype);
+ break;
+ }
}
/* remove any 'weedy' entries */