Skip to content

Commit

Permalink
- eliminated more unneeded shared_ptr’s.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Jun 7, 2022
1 parent 40872a2 commit 9454ba1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/common/rendering/polyrenderer/drawers/poly_thread.cpp
Expand Up @@ -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();
}
5 changes: 2 additions & 3 deletions src/common/rendering/r_thread.h
Expand Up @@ -64,9 +64,8 @@ class DrawerThread
// 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
Expand Down

0 comments on commit 9454ba1

Please sign in to comment.