1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

weak_ptr removed

This commit is contained in:
SoundSSGood
2024-05-01 21:18:36 +03:00
parent 7abfa7b42a
commit 6a1a6b6864
5 changed files with 122 additions and 147 deletions

View File

@@ -55,7 +55,7 @@ CHeroQuickBackpackWindow::CHeroQuickBackpackWindow(const CGHeroInstance * hero,
stretchedBackground = std::make_shared<CFilledTexture>(ImagePath::builtin("DIBOXBCK"), Rect(0, 0, 0, 0));
arts = std::make_shared<CArtifactsOfHeroQuickBackpack>(targetSlot);
arts->moveBy(Point(windowMargin, windowMargin));
addSetAndCallbacks(static_cast<std::weak_ptr<CArtifactsOfHeroQuickBackpack>>(arts));
addSetAndCallbacks(static_cast<std::shared_ptr<CArtifactsOfHeroQuickBackpack>>(arts));
arts->setHero(hero);
addCloseCallback(std::bind(&CHeroQuickBackpackWindow::close, this));
addUsedEvents(GESTURE);