MR feedack

This commit is contained in:
uramer 2022-02-26 12:10:55 +01:00
parent a7bb87d8a1
commit 67879bac55
6 changed files with 30 additions and 35 deletions

View file

@ -7,8 +7,8 @@ namespace LuaUi
{
std::shared_ptr<TextureResource> ResourceManager::registerTexture(TextureData data)
{
std::string normalizedPath = vfs()->normalizeFilename(data.mPath);
if (!vfs()->exists(normalizedPath))
std::string normalizedPath = mVfs->normalizeFilename(data.mPath);
if (!mVfs->exists(normalizedPath))
{
auto error = Misc::StringUtils::format("Texture with path \"%s\" doesn't exist", data.mPath);
throw std::logic_error(error);
@ -19,4 +19,9 @@ namespace LuaUi
list.push_back(std::make_shared<TextureResource>(data));
return list.back();
}
void ResourceManager::clear()
{
mTextures.clear();
}
}