Make GS macro return proper IDType type
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 28 Aug 2017 09:19:58 +0000 (11:19 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 28 Aug 2017 09:21:55 +0000 (11:21 +0200)
commit2e71927622ec7e25c400f23b58fd8d14e056482d
tree0d14bb1f9811849f4f00407e63c70d0d71571a73
parentf4b36786462e52bc914a1cdc182b7e25da081dd0
Make GS macro return proper IDType type

Previously it was returning short, which was really easy to (a) compare against
non-ID type value (b) forget to handle some specific value in switch statement.

Both issues happened in the nearest past, so it's time to tighten some nuts
here.

Most of the change related on silencing strict compiler warning now, but there
is also one tricky aspect: ID_NLA is not in the IDType enum. So there is still
cast to short to handle that switch. If someone has better ideas how to deal
with this please go ahead :)
22 files changed:
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/icons.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/object_deform.c
source/blender/blenkernel/intern/packedFile.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/texture.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/render/render_shading.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_time/space_time.c
source/blender/makesdna/DNA_ID.h
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_key.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/windowmanager/intern/wm_operators.c