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/texture.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/blucat/texture.cpp') 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-> -- cgit v1.2.3