- eliminated more unneeded shared_ptr’s.

This commit is contained in:
Christoph Oelckers 2022-06-07 14:09:00 +02:00
parent 40872a2b21
commit 9454ba1009
2 changed files with 3 additions and 4 deletions

View file

@ -822,6 +822,6 @@ int PolyTriangleThreadData::ClipEdge(const ShadedTriVertex *const* verts)
PolyTriangleThreadData *PolyTriangleThreadData::Get(DrawerThread *thread)
{
if (!thread->poly)
thread->poly = std::make_shared<PolyTriangleThreadData>(thread->core, thread->num_cores, thread->numa_node, thread->num_numa_nodes, thread->numa_start_y, thread->numa_end_y);
thread->poly = std::make_unique<PolyTriangleThreadData>(thread->core, thread->num_cores, thread->numa_node, thread->num_numa_nodes, thread->numa_start_y, thread->numa_end_y);
return thread->poly.get();
}

View file

@ -64,9 +64,8 @@ public:
// Working buffer used by the tilted (sloped) span drawer
const uint8_t *tiltlighting[MAXWIDTH];
std::shared_ptr<PolyTriangleThreadData> poly;
std::shared_ptr<swrenderer::WallColumnDrawerArgs> columndrawer;
std::unique_ptr<PolyTriangleThreadData> poly;
size_t debug_draw_pos = 0;
// Checks if a line is rendered by this thread