summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-08-02 01:13:48 +0200
committerSven Gothel <[email protected]>2015-08-02 01:13:48 +0200
commit8342d3bdbe2e14ad44dfc708e00daf721dae6a58 (patch)
treea61bcd89ae43c010d05ca40446176cde88bd9d05 /src
parent047e9adaf2a5f51f7acfa194a744c99b6bfadaea (diff)
IntBitfield: Fix units calculation ( +7 -> +31 for ceiling, using 32bits per unit)
Diffstat (limited to 'src')
-rw-r--r--src/java/com/jogamp/common/util/IntBitfield.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/java/com/jogamp/common/util/IntBitfield.java b/src/java/com/jogamp/common/util/IntBitfield.java
index e7a9d70..6aad391 100644
--- a/src/java/com/jogamp/common/util/IntBitfield.java
+++ b/src/java/com/jogamp/common/util/IntBitfield.java
@@ -54,7 +54,7 @@ public class IntBitfield {
* @param bitCount
*/
public IntBitfield(final long bitCount) {
- final int units = (int) Math.max(1L, ( bitCount + 7L ) >>> UNIT_SHIFT_L);
+ final int units = (int) Math.max(1L, ( bitCount + 31L ) >>> UNIT_SHIFT_L);
this.storage = new int[units];
this.bitsCountL = (long)units << UNIT_SHIFT_L ;
this.bitsCountI = bitsCountL > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int)bitsCountL;
@@ -64,7 +64,7 @@ public class IntBitfield {
* @param bitCount
*/
public IntBitfield(final int bitCount) {
- final int units = Math.max(1, ( bitCount + 7 ) >>> UNIT_SHIFT_I);
+ final int units = Math.max(1, ( bitCount + 31 ) >>> UNIT_SHIFT_I);
this.storage = new int[units];
this.bitsCountI = units << UNIT_SHIFT_I;
this.bitsCountL = bitsCountI;