diff options
author | Frederico Linhares <fred@linhares.blue> | 2024-12-30 23:25:24 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2024-12-30 23:25:24 -0300 |
commit | 083e64da1d4b5b68579288bc1690ca90d3f0a2c0 (patch) | |
tree | e2cbf364bc02e76f4a6065e35c3c8a6399389df3 /src/blucat/sprite.cpp | |
parent | 46c1f83aa6ba6216fb2fe83dac7612224d19b5aa (diff) |
refa Using reference arguments for Texture and Sprite
Diffstat (limited to 'src/blucat/sprite.cpp')
-rw-r--r-- | src/blucat/sprite.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/blucat/sprite.cpp b/src/blucat/sprite.cpp index 506d87a..0c66a27 100644 --- a/src/blucat/sprite.cpp +++ b/src/blucat/sprite.cpp @@ -28,12 +28,12 @@ namespace struct SpriteBuilder { BluCat::Sprite *sprite; - glm::vec4 ▭ + const glm::vec4 ▭ - SpriteBuilder(BluCat::Sprite *sprite, glm::vec4 &rect); + SpriteBuilder(BluCat::Sprite *sprite, const glm::vec4 &rect); }; -SpriteBuilder::SpriteBuilder(BluCat::Sprite *sprite, glm::vec4 &rect): +SpriteBuilder::SpriteBuilder(BluCat::Sprite *sprite, const glm::vec4 &rect): sprite{sprite}, rect{rect} { @@ -82,7 +82,7 @@ static const CommandChain loader{ namespace BluCat { -Sprite::Sprite(std::shared_ptr<Texture> texture, glm::vec4 &rect): +Sprite::Sprite(std::shared_ptr<Texture> texture, const glm::vec4 &rect): texture{texture} { SpriteBuilder sprite_builder(this, rect); |