diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-08-28 12:19:58 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-08-28 12:21:55 +0300 |
commit | 2e71927622ec7e25c400f23b58fd8d14e056482d (patch) | |
tree | 0d14bb1f9811849f4f00407e63c70d0d71571a73 /source/blender/makesrna/intern | |
parent | f4b36786462e52bc914a1cdc182b7e25da081dd0 (diff) |
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 :)
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_image.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_key.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_texture.c | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index b6e84cf8ac3..5ca7e624d88 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -192,6 +192,8 @@ static char *rna_ImageUser_path(PointerRNA *ptr) { return rna_Node_ImageUser_path(ptr); } + default: + break; } } diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index a5abc8a3be2..b960890457b 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -178,6 +178,8 @@ static Mesh *rna_KeyBlock_normals_get_mesh(PointerRNA *ptr, ID *id) return ob->data; } } + default: + break; } } diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 7a1b5bb678b..2fd471a66ef 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -1045,6 +1045,8 @@ static void rna_SpaceProperties_pin_id_update(Main *UNUSED(bmain), Scene *UNUSED case ID_LA: WM_main_add_notifier(NC_LAMP, NULL); break; + default: + break; } } diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 1e88585a286..4ad2832b953 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -267,6 +267,8 @@ void rna_TextureSlot_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr) WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); break; } + default: + break; } } |