From 60c7b3aa149d667d176663bb44dabe74bedf4b81 Mon Sep 17 00:00:00 2001 From: elsid Date: Sun, 7 Sep 2025 15:56:34 +0200 Subject: [PATCH] Move code from components/lua_ui/resources.cpp to header --- components/lua_ui/resources.cpp | 18 ------------------ components/lua_ui/resources.hpp | 10 ++++++++-- 2 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 components/lua_ui/resources.cpp diff --git a/components/lua_ui/resources.cpp b/components/lua_ui/resources.cpp deleted file mode 100644 index 2bd26a4f63..0000000000 --- a/components/lua_ui/resources.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "resources.hpp" - -#include - -namespace LuaUi -{ - std::shared_ptr ResourceManager::registerTexture(TextureData data) - { - TextureResources& list = mTextures[data.mPath]; - list.push_back(std::make_shared(data)); - return list.back(); - } - - void ResourceManager::clear() - { - mTextures.clear(); - } -} diff --git a/components/lua_ui/resources.hpp b/components/lua_ui/resources.hpp index a472f954db..260e8c473f 100644 --- a/components/lua_ui/resources.hpp +++ b/components/lua_ui/resources.hpp @@ -29,8 +29,14 @@ namespace LuaUi class ResourceManager { public: - std::shared_ptr registerTexture(TextureData data); - void clear(); + std::shared_ptr registerTexture(TextureData data) + { + TextureResources& list = mTextures[data.mPath]; + list.push_back(std::make_shared(std::move(data))); + return list.back(); + } + + void clear() { mTextures.clear(); } private: using TextureResources = std::vector>;