mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 17:47:43 +00:00
General: Use emplace_back's return value where applicable
emplace_back() returns a reference to the added element, so we can use that instead of querying right after the emplacement.
This commit is contained in:
@@ -334,8 +334,7 @@ void FileBrowser::FileListingDataBind::updateListing(const hecl::DirectoryEnumer
|
||||
m_entries.reserve(dEnum.size());
|
||||
|
||||
for (const hecl::DirectoryEnumerator::Entry& d : dEnum) {
|
||||
m_entries.emplace_back();
|
||||
Entry& ent = m_entries.back();
|
||||
Entry& ent = m_entries.emplace_back();
|
||||
ent.m_path = d.m_path;
|
||||
hecl::SystemUTF8Conv nameUtf8(d.m_name);
|
||||
ent.m_name = nameUtf8.str();
|
||||
|
||||
Reference in New Issue
Block a user