mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-11-02 15:20:05 +00:00
Clean up placefile shared pointer usage with const references
This commit is contained in:
parent
232fafc9fa
commit
9955c4ccbe
12 changed files with 33 additions and 31 deletions
|
|
@ -54,7 +54,7 @@ struct PlacefileIconInfo
|
|||
class PlacefileIcons::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),
|
||||
|
|
@ -69,6 +69,9 @@ public:
|
|||
|
||||
~Impl() {}
|
||||
|
||||
void UpdateBuffers();
|
||||
void Update(bool textureAtlasChanged);
|
||||
|
||||
std::shared_ptr<GlContext> context_;
|
||||
|
||||
bool dirty_ {false};
|
||||
|
|
@ -98,12 +101,9 @@ public:
|
|||
std::array<GLuint, 2> vbo_;
|
||||
|
||||
GLsizei numVertices_;
|
||||
|
||||
void UpdateBuffers();
|
||||
void Update(bool textureAtlasChanged);
|
||||
};
|
||||
|
||||
PlacefileIcons::PlacefileIcons(std::shared_ptr<GlContext> context) :
|
||||
PlacefileIcons::PlacefileIcons(const std::shared_ptr<GlContext>& context) :
|
||||
DrawItem(context->gl()), p(std::make_unique<Impl>(context))
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue