1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Replace some raw pointers with unique's or optional

This commit is contained in:
Ivan Savenko
2025-04-27 19:58:21 +03:00
parent 4bafab9ad4
commit c0fb1d1b3b
17 changed files with 47 additions and 86 deletions

View File

@@ -379,7 +379,7 @@ void OptionsTab::CPlayerOptionTooltipBox::genTownWindow()
genHeader();
labelAssociatedCreatures = std::make_shared<CLabel>(pos.w / 2 + 8, 122, FONT_MEDIUM, ETextAlignment::CENTER, Colors::YELLOW, LIBRARY->generaltexth->allTexts[79]);
std::vector<std::shared_ptr<CComponent>> components;
const CTown * town = (*LIBRARY->townh)[factionIndex]->town;
const CTown * town = (*LIBRARY->townh)[factionIndex]->town.get();
for(auto & elem : town->creatures)
{