1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Merge pull request #4025 from IvanSavenko/shared_ptr_lib

[1.6] Use shared_ptr for library entities
This commit is contained in:
Ivan Savenko
2024-05-30 19:14:06 +03:00
committed by GitHub
75 changed files with 175 additions and 229 deletions

View File

@@ -370,7 +370,7 @@ bool CGameInfoCallback::getHeroInfo(const CGObjectInstance * hero, InfoAboutHero
int maxAIValue = 0;
const CCreature * mostStrong = nullptr;
for(auto creature : VLC->creh->objects)
for(const auto & creature : VLC->creh->objects)
{
if(creature->getFaction() == factionIndex && static_cast<int>(creature->getAIValue()) > maxAIValue)
{