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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user