From 3bc227329de724d32191842cbe01816e994d262d Mon Sep 17 00:00:00 2001 From: "arthur.jamet" Date: Mon, 14 Jun 2021 18:31:12 +0200 Subject: [PATCH] attempt to fix compilation for windows --- lib/Ray/sources/Utils/Cache.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Ray/sources/Utils/Cache.hpp b/lib/Ray/sources/Utils/Cache.hpp index fb819d9c..beb1ff89 100644 --- a/lib/Ray/sources/Utils/Cache.hpp +++ b/lib/Ray/sources/Utils/Cache.hpp @@ -98,12 +98,12 @@ namespace RAY { } else { ::ModelAnimation *animations = this->_dataLoader(path.c_str(), counter); int animCount = *counter; - - this->_cache.emplace(path, (AnimationsHolder){ - std::shared_ptr<::ModelAnimation>( + AnimationsHolder holder = {std::shared_ptr<::ModelAnimation>( animations, [this, animCount](::ModelAnimation *p) { this->_dataUnloader(p, animCount); - }), animCount}); + }),animCount}; + + this->_cache.emplace(path, holder); } return this->_cache[path].animations; };