Optimize parameter passing to avoid unnecessary copying

This commit is contained in:
Pugemon 2024-06-07 03:58:20 +03:00
parent 46ca1bb04a
commit f25a425cb9
123 changed files with 578 additions and 522 deletions

View file

@ -1,5 +1,7 @@
#include "Image.hpp"
#include <utility>
#include "../../core/DrawContext.hpp"
#include "../../core/Batch2D.hpp"
#include "../../core/Texture.hpp"
@ -8,7 +10,7 @@
using namespace gui;
Image::Image(std::string texture, glm::vec2 size) : UINode(size), texture(texture) {
Image::Image(std::string texture, glm::vec2 size) : UINode(size), texture(std::move(texture)) {
setInteractive(false);
}