mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
Usage of emplace[_back]() as per cuavas
This commit is contained in:
parent
749e182a80
commit
a21f23357a
@ -361,11 +361,11 @@ void menu::item_append(std::string &&text, std::string &&subtext, UINT32 flags,
|
||||
auto index = item.size();
|
||||
if (!item.empty())
|
||||
{
|
||||
item.insert(item.end() - 1, pitem);
|
||||
item.emplace(item.end() - 1, std::move(pitem));
|
||||
--index;
|
||||
}
|
||||
else
|
||||
item.push_back(pitem);
|
||||
item.emplace_back(std::move(pitem));
|
||||
|
||||
// update the selection if we need to
|
||||
if (resetpos == index || (resetref != nullptr && resetref == ref))
|
||||
|
Loading…
Reference in New Issue
Block a user