if (!world->hide_from_contribs)
{
add_entry(i++, world->get_title());
- m_contrib_worlds.push_back(world.release());
+ m_contrib_worlds.push_back(std::move(world));
}
}
catch(std::exception& e)
ContribMenu::~ContribMenu()
{
- for(std::vector<World*>::iterator i = m_contrib_worlds.begin(); i != m_contrib_worlds.end(); ++i)
- {
- delete *i;
- }
- m_contrib_worlds.clear();
}
void
int index = check();
if (index != -1)
{
- World* world = m_contrib_worlds[index];
+ World* world = m_contrib_worlds[index].get();
if (!world->is_levelset)
{