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:
-rw-r--r--source/blender/blenkernel/intern/ocean.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c4
-rw-r--r--source/blender/editors/transform/transform_conversions.c15
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp2
4 files changed, 14 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c
index b89b5ab4bbc..1a178fb2bdf 100644
--- a/source/blender/blenkernel/intern/ocean.c
+++ b/source/blender/blenkernel/intern/ocean.c
@@ -738,8 +738,8 @@ static void set_height_normalize_factor(struct Ocean *oc)
for (i = 0; i < oc->_M; ++i) {
for (j = 0; j < oc->_N; ++j) {
- if (max_h < fabsf(oc->_disp_y[i * oc->_N + j])) {
- max_h = fabsf(oc->_disp_y[i * oc->_N + j]);
+ if (max_h < fabs(oc->_disp_y[i * oc->_N + j])) {
+ max_h = fabs(oc->_disp_y[i * oc->_N + j]);
}
}
}
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 0be1ad66ec8..520ad4f89b4 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1589,8 +1589,8 @@ unsigned int ED_view3d_backbuf_sample_rect(
/* get x,y pixel coords from the offset
* (manhatten distance in keeping with other screen-based selection) */
*r_dist = (float)(
- abs(((tbuf - buf->rect) % size) - (size / 2)) +
- abs(((tbuf - buf->rect) / size) - (size / 2)));
+ abs(((int)(tbuf - buf->rect) % size) - (size / 2)) +
+ abs(((int)(tbuf - buf->rect) / size) - (size / 2)));
/* indices start at 1 here */
index = (*tbuf - min) + 1;
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 0cdc2b5eb6c..8aa26c32413 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -31,6 +31,7 @@
#include <string.h>
#include <math.h>
+#include <limits.h>
#include "DNA_anim_types.h"
#include "DNA_brush_types.h"
@@ -3755,13 +3756,14 @@ static void createTransActionData(bContext *C, TransInfo *t)
}
else {
bGPDframe *gpf_iter;
- float min = FLT_MAX;
+ int min = INT_MAX;
for (gpf_iter = gpl->frames.first; gpf_iter; gpf_iter = gpf->next) {
if (gpf_iter->flag & GP_FRAME_SELECT) {
if (FrameOnMouseSide(t->frame_side, (float)gpf_iter->framenum, cfra)) {
- float val = fabsf(gpf->framenum - gpf_iter->framenum);
- if (val < min)
+ int val = abs(gpf->framenum - gpf_iter->framenum);
+ if (val < min) {
min = val;
+ }
}
}
}
@@ -3781,13 +3783,14 @@ static void createTransActionData(bContext *C, TransInfo *t)
}
else {
MaskLayerShape *masklay_iter;
- float min = FLT_MAX;
+ int min = INT_MAX;
for (masklay_iter = masklay->splines_shapes.first; masklay_iter; masklay_iter = masklay_iter->next) {
if (masklay_iter->flag & MASK_SHAPE_SELECT) {
if (FrameOnMouseSide(t->frame_side, (float)masklay_iter->frame, cfra)) {
- float val = fabsf(masklay_shape->frame - masklay_iter->frame);
- if (val < min)
+ int val = abs(masklay_shape->frame - masklay_iter->frame);
+ if (val < min) {
min = val;
+ }
}
}
}
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
index 984273ec63e..186abdfe598 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
@@ -3672,7 +3672,7 @@ void CcdPhysicsEnvironment::SetupObjectConstraints(KX_GameObject *obj_src, KX_Ga
break;
}
- for (dof; dof < dof_max; dof++) {
+ for (; dof < dof_max; dof++) {
if (dat->flag & dofbit) {
phys_env->SetConstraintParam(constraintId, dof, dat->minLimit[dof], dat->maxLimit[dof]);
}