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/texture.cpp | |
parent | 46c1f83aa6ba6216fb2fe83dac7612224d19b5aa (diff) |
refa Using reference arguments for Texture and Sprite
Diffstat (limited to 'src/blucat/texture.cpp')
-rw-r--r-- | src/blucat/texture.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/blucat/texture.cpp b/src/blucat/texture.cpp index 4c94945..afab950 100644 --- a/src/blucat/texture.cpp +++ b/src/blucat/texture.cpp @@ -55,11 +55,12 @@ struct ImageTextureBuilder: public ImageBuilder { std::string texture_path; - ImageTextureBuilder(BluCat::Texture *t, std::string tp); + ImageTextureBuilder(BluCat::Texture *t, const std::string &tp); ImageTextureBuilder(BluCat::Texture *t, const char* tp); }; -ImageTextureBuilder::ImageTextureBuilder(BluCat::Texture *t, std::string tp): +ImageTextureBuilder::ImageTextureBuilder( + BluCat::Texture *t, const std::string &tp): texture_path{tp} { this->texture = t; @@ -539,7 +540,7 @@ Texture::Texture(Font *font, const char* str) descriptor_loader.execute(this); } -Texture::Texture(std::string texture_path) +Texture::Texture(const std::string &texture_path) { this->queue_family = BluCat::core.vk_device_with_swapchain-> |