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:
authorCampbell Barton <ideasman42@gmail.com>2012-08-02 15:33:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-02 15:33:21 +0400
commitce3293b2d9907cadd7bd88d3b85d9923c4d83e7f (patch)
tree3fb16c3266631dd55671c4c6f8cff311673c5fe3 /source/blender/imbuf
parentb9378a3083b92a09e3afe8446bf2f087fad2db2b (diff)
code cleanup: remove redundant float casts
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/imageprocess.c18
-rw-r--r--source/blender/imbuf/intern/radiance_hdr.c2
-rw-r--r--source/blender/imbuf/intern/scaling.c2
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c
index 5c389925274..e0483f70e72 100644
--- a/source/blender/imbuf/intern/imageprocess.c
+++ b/source/blender/imbuf/intern/imageprocess.c
@@ -88,7 +88,7 @@ static void pixel_from_buffer(struct ImBuf *ibuf, unsigned char **outI, float **
*outI = (unsigned char *)ibuf->rect + offset;
if (ibuf->rect_float)
- *outF = (float *)ibuf->rect_float + offset;
+ *outF = ibuf->rect_float + offset;
}
/**************************************************************************
@@ -258,16 +258,16 @@ void bilinear_interpolation_color(struct ImBuf *in, unsigned char *outI, float *
if (outF) {
/* sample including outside of edges of image */
if (x1 < 0 || y1 < 0) row1 = empty;
- else row1 = (float *)in->rect_float + in->x * y1 * 4 + 4 * x1;
+ else row1 = in->rect_float + in->x * y1 * 4 + 4 * x1;
if (x1 < 0 || y2 > in->y - 1) row2 = empty;
- else row2 = (float *)in->rect_float + in->x * y2 * 4 + 4 * x1;
+ else row2 = in->rect_float + in->x * y2 * 4 + 4 * x1;
if (x2 > in->x - 1 || y1 < 0) row3 = empty;
- else row3 = (float *)in->rect_float + in->x * y1 * 4 + 4 * x2;
+ else row3 = in->rect_float + in->x * y1 * 4 + 4 * x2;
if (x2 > in->x - 1 || y2 > in->y - 1) row4 = empty;
- else row4 = (float *)in->rect_float + in->x * y2 * 4 + 4 * x2;
+ else row4 = in->rect_float + in->x * y2 * 4 + 4 * x2;
a = u - floorf(u);
b = v - floorf(v);
@@ -338,10 +338,10 @@ void bilinear_interpolation_color_wrap(struct ImBuf *in, unsigned char *outI, fl
if (outF) {
/* sample including outside of edges of image */
- row1 = (float *)in->rect_float + in->x * y1 * 4 + 4 * x1;
- row2 = (float *)in->rect_float + in->x * y2 * 4 + 4 * x1;
- row3 = (float *)in->rect_float + in->x * y1 * 4 + 4 * x2;
- row4 = (float *)in->rect_float + in->x * y2 * 4 + 4 * x2;
+ row1 = in->rect_float + in->x * y1 * 4 + 4 * x1;
+ row2 = in->rect_float + in->x * y2 * 4 + 4 * x1;
+ row3 = in->rect_float + in->x * y1 * 4 + 4 * x2;
+ row4 = in->rect_float + in->x * y2 * 4 + 4 * x2;
a = u - floorf(u);
b = v - floorf(v);
diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c
index 2ba1ebf90b5..4cd50484a64 100644
--- a/source/blender/imbuf/intern/radiance_hdr.c
+++ b/source/blender/imbuf/intern/radiance_hdr.c
@@ -213,7 +213,7 @@ struct ImBuf *imb_loadhdr(unsigned char *mem, size_t size, int flags)
/* read in and decode the actual data */
sline = (RGBE *)MEM_mallocN(sizeof(RGBE) * width, "radhdr_read_tmpscan");
- rect_float = (float *)ibuf->rect_float;
+ rect_float = ibuf->rect_float;
for (y = 0; y < height; y++) {
ptr = freadcolrs(sline, ptr, width);
diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c
index 810cb88c06e..a57926f0202 100644
--- a/source/blender/imbuf/intern/scaling.c
+++ b/source/blender/imbuf/intern/scaling.c
@@ -1313,7 +1313,7 @@ static ImBuf *scaleupy(struct ImBuf *ibuf, int newy)
rect += 2 * skipx;
}
if (do_float) {
- rectf = ((float *)ibuf->rect_float) + 4 * (x - 1);
+ rectf = ibuf->rect_float + 4 * (x - 1);
newrectf = _newrectf + 4 * (x - 1);
val_af = rectf[0];