AlexVinS 9 years ago
parent
commit
7e0c4e1451
2 changed files with 3 additions and 3 deletions
  1. 2 2
      client/CPreGame.cpp
  2. 1 1
      client/CPreGame.h

+ 2 - 2
client/CPreGame.cpp

@@ -1284,7 +1284,7 @@ SelectionTab::SelectionTab(CMenuScreen::EState Type, const std::function<void(CM
 	slider = new CSlider(Point(372, 86), tabType != CMenuScreen::saveGame ? 480 : 430, std::bind(&SelectionTab::sliderMove, this, _1), positions, curItems.size(), 0, false, CSlider::BLUE);
 	slider->addUsedEvents(WHEEL);
 
-	formatIcons = new CAnimation("SCSELC.DEF");
+	formatIcons = make_unique<CAnimation>("SCSELC.DEF");
 	formatIcons->load();
 
 	sortingBy = _format;
@@ -1314,7 +1314,7 @@ SelectionTab::SelectionTab(CMenuScreen::EState Type, const std::function<void(CM
 
 SelectionTab::~SelectionTab()
 {
-	delete formatIcons;
+
 }
 
 void SelectionTab::sortBy( int criteria )

+ 1 - 1
client/CPreGame.h

@@ -149,7 +149,7 @@ public:
 class SelectionTab : public CIntObject
 {
 private:
-	CAnimation * formatIcons;
+	std::unique_ptr<CAnimation> formatIcons;
 
     void parseMaps(const std::unordered_set<ResourceID> &files);
 	void parseGames(const std::unordered_set<ResourceID> &files, bool multi);