aboutsummaryrefslogtreecommitdiff
path: root/src/Spv.Generator/GeneratorPool.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Spv.Generator/GeneratorPool.cs')
-rw-r--r--src/Spv.Generator/GeneratorPool.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Spv.Generator/GeneratorPool.cs b/src/Spv.Generator/GeneratorPool.cs
index f6c92918..e4266eee 100644
--- a/src/Spv.Generator/GeneratorPool.cs
+++ b/src/Spv.Generator/GeneratorPool.cs
@@ -4,17 +4,15 @@ namespace Spv.Generator
{
public class GeneratorPool<T> where T : class, new()
{
- private List<T[]> _pool;
+ private readonly List<T[]> _pool;
private int _chunkIndex = -1;
private int _poolIndex = -1;
- private int _initialSize;
- private int _poolSizeIncrement;
+ private readonly int _poolSizeIncrement;
- public GeneratorPool(): this(1000, 200) { }
+ public GeneratorPool() : this(1000, 200) { }
public GeneratorPool(int chunkSizeLimit, int poolSizeIncrement)
{
- _initialSize = chunkSizeLimit;
_poolSizeIncrement = poolSizeIncrement;
_pool = new(chunkSizeLimit * 2);