summaryrefslogtreecommitdiff
path: root/src/blucat/sprite.cpp
diff options
context:
space:
mode:
authorFrederico Linhares <fred@linhares.blue>2024-12-30 23:25:24 -0300
committerFrederico Linhares <fred@linhares.blue>2024-12-30 23:25:24 -0300
commit083e64da1d4b5b68579288bc1690ca90d3f0a2c0 (patch)
treee2cbf364bc02e76f4a6065e35c3c8a6399389df3 /src/blucat/sprite.cpp
parent46c1f83aa6ba6216fb2fe83dac7612224d19b5aa (diff)
refa Using reference arguments for Texture and Sprite
Diffstat (limited to 'src/blucat/sprite.cpp')
-rw-r--r--src/blucat/sprite.cpp8
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 &rect;
+ const glm::vec4 &rect;
- 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);