aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-01-20 04:10:57 +0100
committerMattias Andrée <maandree@operamail.com>2014-01-20 04:10:57 +0100
commitbdebe2031d2c90e15dcfb4c10979678ae565c6a9 (patch)
treeb4e941dc73d1fd0fa6eb1f676765f0772a8f5f53 /src
parentm + counting bits (diff)
downloadalgorithms-and-data-structures-bdebe2031d2c90e15dcfb4c10979678ae565c6a9.tar.gz
algorithms-and-data-structures-bdebe2031d2c90e15dcfb4c10979678ae565c6a9.tar.bz2
algorithms-and-data-structures-bdebe2031d2c90e15dcfb4c10979678ae565c6a9.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/algorithms/bits/Bits.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/algorithms/bits/Bits.java b/src/algorithms/bits/Bits.java
index 0930b19..b1719bc 100644
--- a/src/algorithms/bits/Bits.java
+++ b/src/algorithms/bits/Bits.java
@@ -134,9 +134,7 @@ public class Bits
*/
public static £{T} ones_table(£{T} value)
{
-£<function lookup
- { echo "ONES_TABLE_256[(int)((value >> $1) & 255)]"
-£>}
+£>function lookup { echo "ONES_TABLE_256[(int)((value >> $1) & 255)]" ; }
return (£{T})((£{T})(£(lookup 0) + £(lookup 8)) + (£{T})(£(lookup 16) + £(lookup 24)));
/* In C you can split the value by getting the address of the value and cast the pointer to char* */
}