2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 21:47:42 +00:00

const_cast refactor

This commit is contained in:
Jack Andersen
2016-08-28 18:22:54 -10:00
parent e2f342d107
commit 0aaeed2aeb
15 changed files with 26 additions and 30 deletions

View File

@@ -111,11 +111,11 @@ CCharacterFactory::CreateCharacter(int charIdx, bool loop,
CVParamTransfer charParm(new TObjOwnerParam<const CCharacterInfo*>(&charInfo));
TToken<CSkinnedModel> skinnedModel =
((CCharacterFactory*)this)->x70_cacheResPool.GetObj({FourCC(), charInfo.GetModelId()}, charParm);
const_cast<CCharacterFactory*>(this)->x70_cacheResPool.GetObj({FourCC(), charInfo.GetModelId()}, charParm);
rstl::optional_object<TToken<CMorphableSkinnedModel>> iceModel;
if (charInfo.GetIceModelId() && charInfo.GetIceSkinRulesId())
iceModel.emplace(((CCharacterFactory*)this)->x70_cacheResPool.GetObj({FourCC(1), charInfo.GetIceModelId()}, charParm));
iceModel.emplace(const_cast<CCharacterFactory*>(this)->x70_cacheResPool.GetObj({FourCC(1), charInfo.GetIceModelId()}, charParm));
return std::make_unique<CAnimData>(x68_selfId, charInfo, defaultAnim, charIdx, loop,
x14_charLayoutInfoDB[charIdx], skinnedModel,