diff --git a/lib/Ray/sources/Drawables/Image.cpp b/lib/Ray/sources/Drawables/Image.cpp index 0f85adbc..5796e954 100644 --- a/lib/Ray/sources/Drawables/Image.cpp +++ b/lib/Ray/sources/Drawables/Image.cpp @@ -47,7 +47,7 @@ namespace RAY { { if (Image::_modelsCache.find(path) == Image::_modelsCache.end()) Image::_modelsCache.emplace(path, std::shared_ptr<::Image>( - new ::Image(LoadImage(path.c_str())), [](auto p) { + new ::Image(LoadImage(path.c_str())), [](::Image *p) { UnloadImage(*p); delete p; })); diff --git a/lib/Ray/sources/Model/Model.cpp b/lib/Ray/sources/Model/Model.cpp index f3e396d6..8554a40c 100644 --- a/lib/Ray/sources/Model/Model.cpp +++ b/lib/Ray/sources/Model/Model.cpp @@ -110,7 +110,7 @@ namespace RAY::Drawables::Drawables3D { { if (Model::_modelsCache.find(path) == Model::_modelsCache.end()) Model::_modelsCache.emplace(path, std::shared_ptr<::Model>( - new ::Model(LoadModel(path.c_str())), [](auto p) { + new ::Model(LoadModel(path.c_str())), [](::Model *p) { UnloadModel(*p); delete p; }));