NodeAllocator constructor now reserves space in vector
This is different to vec{capacity}, which would adjust vec::size.
This adjusts vec::capacity instead, which is what I want.
This commit is contained in:
@@ -48,8 +48,9 @@ Node::Node(Fraction val, index_t left, index_t right)
|
||||
{
|
||||
}
|
||||
|
||||
NodeAllocator::NodeAllocator(word_t capacity) : vec{capacity}
|
||||
NodeAllocator::NodeAllocator(word_t capacity)
|
||||
{
|
||||
vec.reserve(capacity);
|
||||
}
|
||||
|
||||
word_t NodeAllocator::alloc(Node n)
|
||||
|
||||
Reference in New Issue
Block a user