commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1763977 - /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/ZigZag.java
Date Sun, 09 Oct 2016 13:22:16 GMT
Author: sebb
Date: Sun Oct  9 13:22:16 2016
New Revision: 1763977

URL: http://svn.apache.org/viewvc?rev=1763977&view=rev
Log:
Eliminate magic number

Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/ZigZag.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/ZigZag.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/ZigZag.java?rev=1763977&r1=1763976&r2=1763977&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/ZigZag.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/ZigZag.java
Sun Oct  9 13:22:16 2016
@@ -31,13 +31,13 @@ final class ZigZag {
     }
     
     public static void zigZagToBlock(final int[] zz, final int[] block) {
-        for (int i = 0; i < 64; i++) {
+        for (int i = 0; i < ZIG_ZAG.length; i++) {
             block[i] = zz[ZIG_ZAG[i]];
         }
     }
 
     public static void blockToZigZag(final int[] block, final int[] zz) {
-        for (int i = 0; i < 64; i++) {
+        for (int i = 0; i < ZIG_ZAG.length; i++) {
             zz[ZIG_ZAG[i]] = block[i];
         }
     }



Mime
View raw message