diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-27 20:22:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-27 21:05:37 +0400 |
commit | c3d3ae3ee7549de94121bee52b9604b142a7f27f (patch) | |
tree | 28b30bd3fc650d3959b98ddcc5ee70d62435c47f /source/blender/editors/armature/armature_select.c | |
parent | f0ec202099aa473778497f810ff6cb804511c77d (diff) |
Code cleanup: avoid warning about bit-shift outside int range
Diffstat (limited to 'source/blender/editors/armature/armature_select.c')
-rw-r--r-- | source/blender/editors/armature/armature_select.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c index e420e56fdb0..9c3c93e4850 100644 --- a/source/blender/editors/armature/armature_select.c +++ b/source/blender/editors/armature/armature_select.c @@ -80,13 +80,15 @@ void *get_bone_from_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, EditBone *ebone; void *firstunSel = NULL, *firstSel = NULL, *data; unsigned int hitresult; - short i, takeNext = 0, sel; + short i; + bool takeNext = false; for (i = 0; i < hits; i++) { hitresult = buffer[3 + (i * 4)]; - if (!(hitresult & BONESEL_NOSEL)) { // -1 - if (hitresult & BONESEL_ANY) { // to avoid including objects in selection + if (!(hitresult & BONESEL_NOSEL)) { + if (hitresult & BONESEL_ANY) { /* to avoid including objects in selection */ + bool sel; hitresult &= ~(BONESEL_ANY); /* Determine what the current bone is */ @@ -305,7 +307,7 @@ static EditBone *get_nearest_editbonepoint(ViewContext *vc, const int mval[2], if (hits > 0) { if (hits == 1) { - if (!(buffer[3] & BONESEL_NOSEL)) + if (!(buffer[3] & BONESEL_NOSEL)) besthitresult = buffer[3]; } else { |