Clean up placefile shared pointer usage with const references

This commit is contained in:
Dan Paulat 2023-08-22 21:52:11 -05:00
parent 232fafc9fa
commit 9955c4ccbe
12 changed files with 33 additions and 31 deletions

View file

@ -42,7 +42,7 @@ typedef std::array<GLdouble, kTessVertexSize_> TessVertexArray;
class PlacefilePolygons::Impl
{
public:
explicit Impl(std::shared_ptr<GlContext> context) :
explicit Impl(const std::shared_ptr<GlContext>& context) :
context_ {context},
shaderProgram_ {nullptr},
uMVPMatrixLocation_(GL_INVALID_INDEX),
@ -115,7 +115,8 @@ public:
GLint currentThreshold_;
};
PlacefilePolygons::PlacefilePolygons(std::shared_ptr<GlContext> context) :
PlacefilePolygons::PlacefilePolygons(
const std::shared_ptr<GlContext>& context) :
DrawItem(context->gl()), p(std::make_unique<Impl>(context))
{
}