[Bf-blender-cvs] [c3d3ae3] master: Code cleanup: avoid warning about bit-shift outside int range
Campbell Barton
noreply at git.blender.org
Sun Apr 27 19:05:55 CEST 2014
Commit: c3d3ae3ee7549de94121bee52b9604b142a7f27f
Author: Campbell Barton
Date: Mon Apr 28 02:22:03 2014 +1000
https://developer.blender.org/rBc3d3ae3ee7549de94121bee52b9604b142a7f27f
Code cleanup: avoid warning about bit-shift outside int range
===================================================================
M source/blender/blenkernel/intern/DerivedMesh.c
M source/blender/blenkernel/intern/fluidsim.c
M source/blender/editors/armature/armature_select.c
M source/blender/editors/include/ED_armature.h
===================================================================
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 1f5ad4f..84bf980 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -41,7 +41,7 @@
#include "DNA_meshdata_types.h"
#include "DNA_armature_types.h"
#include "DNA_object_types.h"
-#include "DNA_scene_types.h" // N_T
+#include "DNA_scene_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c
index efc9869..beb85b3 100644
--- a/source/blender/blenkernel/intern/fluidsim.c
+++ b/source/blender/blenkernel/intern/fluidsim.c
@@ -44,7 +44,7 @@
#include "DNA_object_force.h" // for pointcache
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
-#include "DNA_scene_types.h" // N_T
+#include "DNA_scene_types.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index e420e56..9c3c93e 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 {
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 4cf2257..be2c7da 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -90,7 +90,7 @@ typedef struct EditBone {
#define BONESEL_BONE (1 << 30)
#define BONESEL_ANY (BONESEL_TIP | BONESEL_ROOT | BONESEL_BONE)
-#define BONESEL_NOSEL (1 << 31) /* Indicates a negative number */
+#define BONESEL_NOSEL (1u << 31u)
/* useful macros */
#define EBONE_VISIBLE(arm, ebone) ( \
More information about the Bf-blender-cvs
mailing list