mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 23:08:05 -05:00
refactor: use std ranges functions where applicable
This commit is contained in:
@ -82,7 +82,7 @@ std::vector<scr_string_t> AssetMarker::GetUsedScriptStrings() const
|
||||
for (auto scrString : m_used_script_strings)
|
||||
usedScriptStrings.push_back(scrString);
|
||||
|
||||
std::sort(usedScriptStrings.begin(), usedScriptStrings.end());
|
||||
std::ranges::sort(usedScriptStrings);
|
||||
}
|
||||
|
||||
return usedScriptStrings;
|
||||
|
@ -30,12 +30,11 @@ void ZoneLoader::AddXBlock(std::unique_ptr<XBlock> block)
|
||||
{
|
||||
m_blocks.push_back(block.get());
|
||||
|
||||
std::sort(m_blocks.begin(),
|
||||
m_blocks.end(),
|
||||
[](XBlock* b1, XBlock* b2) -> bool
|
||||
{
|
||||
return b1->m_index < b2->m_index;
|
||||
});
|
||||
std::ranges::sort(m_blocks,
|
||||
[](XBlock* b1, XBlock* b2) -> bool
|
||||
{
|
||||
return b1->m_index < b2->m_index;
|
||||
});
|
||||
|
||||
m_zone->GetMemory()->AddBlock(std::move(block));
|
||||
}
|
||||
|
Reference in New Issue
Block a user