mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-12 08:58:02 -04:00
array float lists: make min grow step a power of 2
This commit is contained in:
parent
dbd4752d09
commit
faa2b10b51
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Minosoft
|
* Minosoft
|
||||||
* Copyright (C) 2020-2023 Moritz Zwerger
|
* Copyright (C) 2020-2025 Moritz Zwerger
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
@ -35,7 +35,7 @@ class BufferedArrayFloatList(
|
|||||||
|
|
||||||
private val nextGrowStep = when {
|
private val nextGrowStep = when {
|
||||||
initialSize <= 0 -> FloatListUtil.DEFAULT_INITIAL_SIZE
|
initialSize <= 0 -> FloatListUtil.DEFAULT_INITIAL_SIZE
|
||||||
initialSize <= 100 -> 100
|
initialSize <= 128 -> 128
|
||||||
else -> initialSize
|
else -> initialSize
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class FragmentedArrayFloatList(
|
|||||||
|
|
||||||
private val nextGrowStep = when {
|
private val nextGrowStep = when {
|
||||||
growStep <= 0 -> FloatListUtil.DEFAULT_INITIAL_SIZE
|
growStep <= 0 -> FloatListUtil.DEFAULT_INITIAL_SIZE
|
||||||
growStep <= 100 -> 100
|
growStep <= 128 -> 128
|
||||||
else -> growStep
|
else -> growStep
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user