[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47585] trunk/blender/source/blender/ blenkernel/intern: remove casts to short when allocating new imbufs.

Campbell Barton ideasman42 at gmail.com
Thu Jun 7 20:33:38 CEST 2012


Revision: 47585
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47585
Author:   campbellbarton
Date:     2012-06-07 18:33:36 +0000 (Thu, 07 Jun 2012)
Log Message:
-----------
remove casts to short when allocating new imbufs.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/image.c
    trunk/blender/source/blender/blenkernel/intern/seqeffects.c
    trunk/blender/source/blender/blenkernel/intern/sequencer.c

Modified: trunk/blender/source/blender/blenkernel/intern/image.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/image.c	2012-06-07 18:24:36 UTC (rev 47584)
+++ trunk/blender/source/blender/blenkernel/intern/image.c	2012-06-07 18:33:36 UTC (rev 47585)
@@ -119,8 +119,8 @@
 	
 	if (ibuf->rect) {
 		/* make copies */
-		tbuf1 = IMB_allocImBuf(ibuf->x, (short)(ibuf->y >> 1), (unsigned char)32, (int)IB_rect);
-		tbuf2 = IMB_allocImBuf(ibuf->x, (short)(ibuf->y >> 1), (unsigned char)32, (int)IB_rect);
+		tbuf1 = IMB_allocImBuf(ibuf->x, (ibuf->y >> 1), (unsigned char)32, (int)IB_rect);
+		tbuf2 = IMB_allocImBuf(ibuf->x, (ibuf->y >> 1), (unsigned char)32, (int)IB_rect);
 		
 		ibuf->x *= 2;
 		
@@ -147,8 +147,8 @@
 	
 	if (ibuf->rect) {
 		/* make copies */
-		tbuf1 = IMB_allocImBuf(ibuf->x, (short)(ibuf->y >> 1), (unsigned char)32, IB_rect);
-		tbuf2 = IMB_allocImBuf(ibuf->x, (short)(ibuf->y >> 1), (unsigned char)32, IB_rect);
+		tbuf1 = IMB_allocImBuf(ibuf->x, (ibuf->y >> 1), (unsigned char)32, IB_rect);
+		tbuf2 = IMB_allocImBuf(ibuf->x, (ibuf->y >> 1), (unsigned char)32, IB_rect);
 		
 		ibuf->x *= 2;
 		

Modified: trunk/blender/source/blender/blenkernel/intern/seqeffects.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/seqeffects.c	2012-06-07 18:24:36 UTC (rev 47584)
+++ trunk/blender/source/blender/blenkernel/intern/seqeffects.c	2012-06-07 18:33:36 UTC (rev 47585)
@@ -77,7 +77,7 @@
 
 	if (!ibuf1 && !ibuf2 && !ibuf3) {
 		/* hmmm, global float option ? */
-		out = IMB_allocImBuf((short)x, (short)y, 32, IB_rect);
+		out = IMB_allocImBuf(x, y, 32, IB_rect);
 	}
 	else if ((ibuf1 && ibuf1->rect_float) ||
 	         (ibuf2 && ibuf2->rect_float) ||
@@ -85,10 +85,10 @@
 	{
 		/* if any inputs are rectfloat, output is float too */
 
-		out = IMB_allocImBuf((short)x, (short)y, 32, IB_rectfloat);
+		out = IMB_allocImBuf(x, y, 32, IB_rectfloat);
 	}
 	else {
-		out = IMB_allocImBuf((short)x, (short)y, 32, IB_rect);
+		out = IMB_allocImBuf(x, y, 32, IB_rect);
 	}
 	
 	if (ibuf1 && !ibuf1->rect_float && out->rect_float) {

Modified: trunk/blender/source/blender/blenkernel/intern/sequencer.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/sequencer.c	2012-06-07 18:24:36 UTC (rev 47584)
+++ trunk/blender/source/blender/blenkernel/intern/sequencer.c	2012-06-07 18:33:36 UTC (rev 47585)
@@ -1919,8 +1919,7 @@
 	input[0] = seq->seq1; input[1] = seq->seq2; input[2] = seq->seq3;
 
 	if (!sh.execute) { /* effect not supported in this version... */
-		out = IMB_allocImBuf((short)context.rectx, 
-		                     (short)context.recty, 32, IB_rect);
+		out = IMB_allocImBuf(context.rectx, context.recty, 32, IB_rect);
 		return out;
 	}
 
@@ -1997,7 +1996,7 @@
 	}
 
 	if (out == NULL) {
-		out = IMB_allocImBuf((short)context.rectx, (short)context.recty, 32, IB_rect);
+		out = IMB_allocImBuf(context.rectx, context.recty, 32, IB_rect);
 	}
 
 	return out;
@@ -2450,7 +2449,7 @@
 		}
 
 	if (ibuf == NULL)
-		ibuf = IMB_allocImBuf((short)context.rectx, (short)context.recty, 32, IB_rect);
+		ibuf = IMB_allocImBuf(context.rectx, context.recty, 32, IB_rect);
 
 	if (ibuf->x != context.rectx || ibuf->y != context.recty)
 		use_preprocess = TRUE;
@@ -2565,7 +2564,7 @@
 				break;
 			case EARLY_USE_INPUT_1:
 				if (i == 0) {
-					out = IMB_allocImBuf((short)context.rectx, (short)context.recty, 32, IB_rect);
+					out = IMB_allocImBuf(context.rectx, context.recty, 32, IB_rect);
 				}
 				break;
 			case EARLY_DO_EFFECT:




More information about the Bf-blender-cvs mailing list