Eliminate some unnecessary pointer indirection
Buckets had a pointer to the associated layout type, when they can just have a direct member.
This commit is contained in:
@@ -28,12 +28,10 @@ void FillBucket::free(void *, void *ptr) {
|
||||
::free(ptr);
|
||||
}
|
||||
|
||||
FillBucket::FillBucket(std::unique_ptr<const StyleLayoutFill> styleLayout_,
|
||||
FillVertexBuffer &vertexBuffer_,
|
||||
FillBucket::FillBucket(FillVertexBuffer &vertexBuffer_,
|
||||
TriangleElementsBuffer &triangleElementsBuffer_,
|
||||
LineElementsBuffer &lineElementsBuffer_)
|
||||
: styleLayout(std::move(styleLayout_)),
|
||||
allocator(new TESSalloc{
|
||||
: allocator(new TESSalloc{
|
||||
&alloc,
|
||||
&realloc,
|
||||
&free,
|
||||
@@ -53,7 +51,6 @@ FillBucket::FillBucket(std::unique_ptr<const StyleLayoutFill> styleLayout_,
|
||||
triangle_elements_start(triangleElementsBuffer_.index()),
|
||||
line_elements_start(lineElementsBuffer.index()) {
|
||||
assert(tesselator);
|
||||
assert(styleLayout);
|
||||
}
|
||||
|
||||
FillBucket::~FillBucket() {
|
||||
|
||||
Reference in New Issue
Block a user