From 083e64da1d4b5b68579288bc1690ca90d3f0a2c0 Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Mon, 30 Dec 2024 23:25:24 -0300 Subject: refa Using reference arguments for Texture and Sprite --- src/blucat/sprite.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/blucat/sprite.cpp') 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, glm::vec4 &rect): +Sprite::Sprite(std::shared_ptr texture, const glm::vec4 &rect): texture{texture} { SpriteBuilder sprite_builder(this, rect); -- cgit v1.2.3