1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Fixed access violation - do NOT return address to temporary created on

stack
This commit is contained in:
Ivan Savenko 2022-12-02 21:37:58 +02:00
parent fd21f9ead2
commit 1248292503

View File

@ -1547,16 +1547,18 @@ DLL_LINKAGE ArtifactPosition ArtifactUtils::getArtifactDstPosition( const CArtif
DLL_LINKAGE const std::vector<ArtifactPosition::EArtifactPosition> & ArtifactUtils::unmovableSlots()
{
return
static const std::vector<ArtifactPosition::EArtifactPosition> positions =
{
ArtifactPosition::SPELLBOOK,
ArtifactPosition::MACH4
};
return positions;
}
DLL_LINKAGE const std::vector<ArtifactPosition::EArtifactPosition> & ArtifactUtils::constituentWornSlots()
{
return
static const std::vector<ArtifactPosition::EArtifactPosition> positions =
{
ArtifactPosition::HEAD,
ArtifactPosition::SHOULDERS,
@ -1573,6 +1575,8 @@ DLL_LINKAGE const std::vector<ArtifactPosition::EArtifactPosition> & ArtifactUti
ArtifactPosition::MISC4,
ArtifactPosition::MISC5,
};
return positions;
}
DLL_LINKAGE bool ArtifactUtils::isArtRemovable(const std::pair<ArtifactPosition, ArtSlotInfo> & slot)