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/blenlib/intern/BLI_kdopbvh.c8
-rw-r--r--source/blender/blenlib/intern/BLI_kdtree.c4
-rw-r--r--source/blender/blenlib/intern/graph.c2
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c2
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c2
-rw-r--r--source/blender/editors/animation/anim_filter.c2
-rw-r--r--source/blender/editors/armature/poseSlide.c6
-rw-r--r--source/blender/editors/armature/poseobject.c4
-rw-r--r--source/blender/editors/object/object_select.c2
-rw-r--r--source/blender/editors/space_graph/graph_draw.c2
-rw-r--r--source/blender/editors/space_nla/nla_edit.c12
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c2
-rw-r--r--source/blender/editors/space_view3d/drawobject.c33
-rw-r--r--source/blender/imbuf/CMakeLists.txt4
-rw-r--r--source/blender/imbuf/intern/indexer_dv.c5
15 files changed, 44 insertions, 46 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 527692348e7..dcbe043f0d0 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -1494,7 +1494,7 @@ static float fast_ray_nearest_hit(const BVHRayCastData *data, const BVHNode *nod
float t2z = (bv[data->index[5]] - data->ray.origin[2]) * data->idot_axis[2];
if(t1x > t2y || t2x < t1y || t1x > t2z || t2x < t1z || t1y > t2z || t2y < t1z) return FLT_MAX;
- if(t2x < 0.0 || t2y < 0.0 || t2z < 0.0) return FLT_MAX;
+ if(t2x < 0.0f || t2y < 0.0f || t2z < 0.0f) return FLT_MAX;
if(t1x > data->hit.dist || t1y > data->hit.dist || t1z > data->hit.dist) return FLT_MAX;
dist = t1x;
@@ -1599,11 +1599,11 @@ int BLI_bvhtree_ray_cast(BVHTree *tree, const float *co, const float *dir, float
data.ray_dot_axis[i] = INPR( data.ray.direction, KDOP_AXES[i]);
data.idot_axis[i] = 1.0f / data.ray_dot_axis[i];
- if(fabs(data.ray_dot_axis[i]) < FLT_EPSILON)
+ if(fabsf(data.ray_dot_axis[i]) < FLT_EPSILON)
{
data.ray_dot_axis[i] = 0.0;
}
- data.index[2*i] = data.idot_axis[i] < 0.0 ? 1 : 0;
+ data.index[2*i] = data.idot_axis[i] < 0.0f ? 1 : 0;
data.index[2*i+1] = 1 - data.index[2*i];
data.index[2*i] += 2*i;
data.index[2*i+1] += 2*i;
@@ -1654,7 +1654,7 @@ float BLI_bvhtree_bb_raycast(float *bv, float *light_start, float *light_end, fl
dist = ray_nearest_hit(&data, bv);
- if(dist > 0.0)
+ if(dist > 0.0f)
{
VECADDFAC(pos, light_start, data.ray.direction, dist);
}
diff --git a/source/blender/blenlib/intern/BLI_kdtree.c b/source/blender/blenlib/intern/BLI_kdtree.c
index 713bfde3417..c885e8c8a9c 100644
--- a/source/blender/blenlib/intern/BLI_kdtree.c
+++ b/source/blender/blenlib/intern/BLI_kdtree.c
@@ -187,7 +187,7 @@ int BLI_kdtree_find_nearest(KDTree *tree, float *co, float *nor, KDTreeNearest *
cur_dist = node->co[node->d] - co[node->d];
- if(cur_dist<0.0){
+ if(cur_dist<0.0f){
cur_dist= -cur_dist*cur_dist;
if(-cur_dist<min_dist){
@@ -294,7 +294,7 @@ int BLI_kdtree_find_n_nearest(KDTree *tree, int n, float *co, float *nor, KDTree
cur_dist = node->co[node->d] - co[node->d];
- if(cur_dist<0.0){
+ if(cur_dist<0.0f){
cur_dist= -cur_dist*cur_dist;
if(found<n || -cur_dist<nearest[found-1].dist){
diff --git a/source/blender/blenlib/intern/graph.c b/source/blender/blenlib/intern/graph.c
index 51e639d1c75..2e26f4bd9c9 100644
--- a/source/blender/blenlib/intern/graph.c
+++ b/source/blender/blenlib/intern/graph.c
@@ -714,7 +714,7 @@ static void handleRadialSymmetry(BGraph *graph, BNode *root_node, int depth, flo
int dispatch = 0;
int last = i - 1;
- if (fabs(ring[first].arc->length - ring[i].arc->length) > limit)
+ if (fabsf(ring[first].arc->length - ring[i].arc->length) > limit)
{
dispatch = 1;
}
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 806af4c0ef5..bdc654ff25a 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -1273,7 +1273,7 @@ static int acf_dstex_icon(bAnimListElem *UNUSED(ale))
/* offset for texture expanders */
// FIXME: soon to be obsolete?
-static short acf_dstex_offset(bAnimContext *UNUSED(ac), bAnimListElem *ale)
+static short acf_dstex_offset(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale))
{
return 14; // XXX: simply include this in indention instead?
}
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index c9d6f9a6420..d58d51c8e08 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -2018,7 +2018,7 @@ static void rename_anim_channels (bAnimContext *ac, int channel_index)
ED_region_tag_redraw(ac->ar);
}
-static int animchannels_rename_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+static int animchannels_rename_invoke (bContext *C, wmOperator *UNUSED(op), wmEvent *evt)
{
bAnimContext ac;
ARegion *ar;
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 0472731dd6d..8010a41ccb3 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -990,7 +990,7 @@ static size_t animfilter_fcurves (ListBase *anim_data, bDopeSheet *ads, FCurve *
return items;
}
-static size_t animfilter_act_group (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAction *act, bActionGroup *agrp, int filter_mode, ID *owner_id)
+static size_t animfilter_act_group (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAction *UNUSED(act), bActionGroup *agrp, int filter_mode, ID *owner_id)
{
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c
index 3c15ff52a30..b0ff60455cf 100644
--- a/source/blender/editors/armature/poseSlide.c
+++ b/source/blender/editors/armature/poseSlide.c
@@ -520,7 +520,7 @@ static void pose_slide_reset (tPoseSlideOp *pso)
/* ------------------------------------ */
/* draw percentage indicator in header */
-static void pose_slide_draw_status (bContext *C, tPoseSlideOp *pso)
+static void pose_slide_draw_status (tPoseSlideOp *pso)
{
char statusStr[32];
char mode[32];
@@ -615,7 +615,7 @@ static int pose_slide_invoke_common (bContext *C, wmOperator *op, tPoseSlideOp *
WM_cursor_modal(win, BC_EW_SCROLLCURSOR);
/* header print */
- pose_slide_draw_status(C, pso);
+ pose_slide_draw_status(pso);
/* add a modal handler for this operator */
WM_event_add_modal_handler(C, op);
@@ -672,7 +672,7 @@ static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
RNA_float_set(op->ptr, "percentage", pso->percentage);
/* update percentage indicator in header */
- pose_slide_draw_status(C, pso);
+ pose_slide_draw_status(pso);
/* reset transforms (to avoid accumulation errors) */
pose_slide_reset(pso);
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index d2f32837d6d..3911be02fe7 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -1611,7 +1611,7 @@ static int compare_agroup(const void *sgrp_a_ptr, const void *sgrp_b_ptr)
return strcmp(sgrp_a->agrp->name, sgrp_b->agrp->name);
}
-static int group_sort_exec(bContext *C, wmOperator *op)
+static int group_sort_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
bPose *pose= (ob) ? ob->pose : NULL;
@@ -2275,7 +2275,7 @@ void POSE_OT_quaternions_flip (wmOperatorType *ot)
/* ********************************************** */
/* Clear User Transforms */
-static int pose_clear_user_transforms_exec (bContext *C, wmOperator *op)
+static int pose_clear_user_transforms_exec (bContext *C, wmOperator *UNUSED(op))
{
Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index b3c4ffc0ac9..cb1fc7541d0 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -600,7 +600,7 @@ static short select_grouped_keyingset(bContext *C, Object *UNUSED(ob))
*/
for (ksp = ks->paths.first; ksp; ksp = ksp->next) {
/* if id matches, select then stop looping (match found) */
- if (ksp->id == base->object) {
+ if (ksp->id == (ID *)base->object) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
break;
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index d65297e068d..dc5e71f0406 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -706,7 +706,7 @@ static void draw_fcurve_curve_bezts (bAnimContext *ac, ID *id, FCurve *fcu, View
if (fcu->driver)
resol= 32;
else
- resol= (int)(5.0*len_v2v2(bezt->vec[1], prevbezt->vec[1]));
+ resol= (int)(5.0f*len_v2v2(bezt->vec[1], prevbezt->vec[1]));
if (resol < 2) {
/* only draw one */
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 0f87be0f807..1894a9fd651 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -533,7 +533,7 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op)
if ELEM(0, (s1->flag & NLASTRIP_FLAG_SELECT), (s2->flag & NLASTRIP_FLAG_SELECT))
continue;
/* check if there's space between the two */
- if (IS_EQ(s1->end, s2->start))
+ if (IS_EQF(s1->end, s2->start))
continue;
/* make sure neither one is a transition
* - although this is impossible to create with the standard tools,
@@ -613,7 +613,7 @@ void NLA_OT_transition_add (wmOperatorType *ot)
/* ******************** Add Sound Clip Operator ***************************** */
/* Add a new sound clip */
-static int nlaedit_add_sound_exec (bContext *C, wmOperator *op)
+static int nlaedit_add_sound_exec (bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
@@ -1013,14 +1013,14 @@ static void nlaedit_split_strip_actclip (AnimData *adt, NlaTrack *nlt, NlaStrip
/* strip extents */
len= strip->end - strip->start;
- if (IS_EQ(len, 0.0f))
+ if (IS_EQF(len, 0.0f))
return;
else
splitframe= strip->start + (len / 2.0f);
/* action range */
len= strip->actend - strip->actstart;
- if (IS_EQ(len, 0.0f))
+ if (IS_EQF(len, 0.0f))
splitaframe= strip->actend;
else
splitaframe= strip->actstart + (len / 2.0f);
@@ -1858,10 +1858,10 @@ static int nlaedit_snap_exec (bContext *C, wmOperator *op)
strip->start= (float)CFRA;
break;
case NLAEDIT_SNAP_NEAREST_FRAME: /* to nearest frame */
- strip->start= (float)(floor(start+0.5));
+ strip->start= floorf(start+0.5);
break;
case NLAEDIT_SNAP_NEAREST_SECOND: /* to nearest second */
- strip->start= ((float)floor(start/secf + 0.5f) * secf);
+ strip->start= floorf(start/secf + 0.5f) * secf;
break;
case NLAEDIT_SNAP_NEAREST_MARKER: /* to nearest marker */
strip->start= (float)ED_markers_find_nearest_marker_time(ac.markers, start);
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 4525ea9c8d9..3ae158bd275 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -822,7 +822,7 @@ static void outliner_do_id_set_operation(SpaceOops *soops, int type, ListBase *l
/* ------------------------------------------ */
-static void actionset_id_cb(TreeElement *te, TreeStoreElem *tselem, TreeStoreElem *tsep, ID *actId)
+static void actionset_id_cb(TreeElement *UNUSED(te), TreeStoreElem *tselem, TreeStoreElem *tsep, ID *actId)
{
bAction *act = (bAction *)actId;
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index b4ccea71aa2..d573198aa10 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -1493,7 +1493,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob
}
/* flag similar to draw_object() */
-static void drawspeaker(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, int flag)
+static void drawspeaker(Scene *UNUSED(scene), View3D *UNUSED(v3d), RegionView3D *UNUSED(rv3d), Object *UNUSED(ob), int UNUSED(flag))
{
//Speaker *spk = ob->data;
@@ -1502,34 +1502,29 @@ static void drawspeaker(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o
glEnable(GL_BLEND);
- for(j = 0; j < 3; j++)
- {
- vec[2] = .25f * j -.125f;
+ for(j = 0; j < 3; j++) {
+ vec[2] = 0.25f * j -0.125f;
glBegin(GL_LINE_LOOP);
- for(i = 0; i < 16; i++)
- {
- vec[0] = cos(M_PI * i / 8.0f) * (j == 0 ? .5f : .25f);
- vec[1] = sin(M_PI * i / 8.0f) * (j == 0 ? .5f : .25f);
+ for(i = 0; i < 16; i++) {
+ vec[0] = cosf(M_PI * i / 8.0f) * (j == 0 ? 0.5f : 0.25f);
+ vec[1] = sinf(M_PI * i / 8.0f) * (j == 0 ? 0.5f : 0.25f);
glVertex3fv(vec);
}
glEnd();
}
- for(j = 0; j < 4; j++)
- {
- vec[0] = (((j + 1) % 2) * (j - 1)) * .5f;
- vec[1] = ((j % 2) * (j - 2)) * .5f;
+ for(j = 0; j < 4; j++) {
+ vec[0] = (((j + 1) % 2) * (j - 1)) * 0.5f;
+ vec[1] = ((j % 2) * (j - 2)) * 0.5f;
glBegin(GL_LINE_STRIP);
- for(i = 0; i < 3; i++)
- {
- if(i == 1)
- {
- vec[0] *= .5f;
- vec[1] *= .5f;
+ for(i = 0; i < 3; i++) {
+ if(i == 1) {
+ vec[0] *= 0.5f;
+ vec[1] *= 0.5f;
}
- vec[2] = .25f * i -.125f;
+ vec[2] = 0.25f * i -0.125f;
glVertex3fv(vec);
}
glEnd();
diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt
index ff13be20d4e..1547d2ee9ce 100644
--- a/source/blender/imbuf/CMakeLists.txt
+++ b/source/blender/imbuf/CMakeLists.txt
@@ -55,6 +55,8 @@ set(SRC
intern/filetype.c
intern/filter.c
intern/imageprocess.c
+ intern/indexer.c
+ intern/indexer_dv.c
intern/iris.c
intern/jp2.c
intern/jpeg.c
@@ -73,7 +75,6 @@ set(SRC
intern/tiff.c
intern/util.c
intern/writeimage.c
- intern/indexer.c
IMB_imbuf.h
IMB_imbuf_types.h
@@ -82,6 +83,7 @@ set(SRC
intern/IMB_anim.h
intern/IMB_filetype.h
intern/IMB_filter.h
+ intern/IMB_indexer.h
intern/IMB_metadata.h
intern/cineon/cin_debug_stuff.h
intern/cineon/cineonfile.h
diff --git a/source/blender/imbuf/intern/indexer_dv.c b/source/blender/imbuf/intern/indexer_dv.c
index 0961af10f69..2def0d042b7 100644
--- a/source/blender/imbuf/intern/indexer_dv.c
+++ b/source/blender/imbuf/intern/indexer_dv.c
@@ -26,6 +26,7 @@
#include "IMB_indexer.h"
#include "MEM_guardedalloc.h"
+#include "BLI_utildefines.h"
#include <time.h>
typedef struct indexer_dv_bitstream {
@@ -279,7 +280,7 @@ static void fill_gap(indexer_dv_context * This, int isPAL)
}
static void proc_frame(indexer_dv_context * This,
- unsigned char* framebuffer, int isPAL)
+ unsigned char* UNUSED(framebuffer), int isPAL)
{
struct tm recDate;
time_t t;
@@ -329,7 +330,7 @@ static void proc_frame(indexer_dv_context * This,
static void indexer_dv_proc_frame(anim_index_builder * idx,
unsigned char * buffer,
- int data_size,
+ int UNUSED(data_size),
struct anim_index_entry * entry)
{
int isPAL;