Revision: 292
http://patchanim.svn.sourceforge.net/patchanim/?rev=292&view=rev
Author: dbrosius
Date: 2009-09-05 21:48:51 +0000 (Sat, 05 Sep 2009)
Log Message:
-----------
unnecessary cast
Modified Paths:
--------------
trunk/patchanim/src/com/fmsware/gif/NeuQuant.java
Modified: trunk/patchanim/src/com/fmsware/gif/NeuQuant.java
===================================================================
--- trunk/patchanim/src/com/fmsware/gif/NeuQuant.java 2009-08-18 00:11:28 UTC (rev 291)
+++ trunk/patchanim/src/com/fmsware/gif/NeuQuant.java 2009-09-05 21:48:51 UTC (rev 292)
@@ -55,9 +55,9 @@
/* defs for freq and bias */
protected static final int intbiasshift = 16; /* bias for fractions */
- protected static final int intbias = (((int) 1) << intbiasshift);
+ protected static final int intbias = (1 << intbiasshift);
protected static final int gammashift = 10; /* gamma = 1024 */
- protected static final int gamma = (((int) 1) << gammashift);
+ protected static final int gamma = (1 << gammashift);
protected static final int betashift = 10;
protected static final int beta = (intbias >> betashift); /* beta = 1/1024 */
protected static final int betagamma =
@@ -66,21 +66,21 @@
/* defs for decreasing radius factor */
protected static final int initrad = (netsize >> 3); /* for 256 cols, radius starts */
protected static final int radiusbiasshift = 6; /* at 32.0 biased by 6 bits */
- protected static final int radiusbias = (((int) 1) << radiusbiasshift);
+ protected static final int radiusbias = (1 << radiusbiasshift);
protected static final int initradius = (initrad * radiusbias); /* and decreases by a */
protected static final int radiusdec = 30; /* factor of 1/30 each cycle */
/* defs for decreasing alpha factor */
protected static final int alphabiasshift = 10; /* alpha starts at 1.0 */
- protected static final int initalpha = (((int) 1) << alphabiasshift);
+ protected static final int initalpha = (1 << alphabiasshift);
protected int alphadec; /* biased by 10 bits */
/* radbias and alpharadbias used for radpower calculation */
protected static final int radbiasshift = 8;
- protected static final int radbias = (((int) 1) << radbiasshift);
+ protected static final int radbias = (1 << radbiasshift);
protected static final int alpharadbshift = (alphabiasshift + radbiasshift);
- protected static final int alpharadbias = (((int) 1) << alpharadbshift);
+ protected static final int alpharadbias = (1 << alpharadbshift);
/* Types and Global Variables
-------------------------- */
@@ -413,7 +413,7 @@
int bestpos, bestbiaspos, bestd, bestbiasd;
int[] n;
- bestd = ~(((int) 1) << 31);
+ bestd = ~(1 << 31);
bestbiasd = bestd;
bestpos = -1;
bestbiaspos = bestpos;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|