mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-12 07:48:16 -05:00
refactor: use std ranges functions where applicable
This commit is contained in:
@ -48,12 +48,11 @@ void AssetLoaderFontIcon::PreprocessRow(std::vector<std::string>& row)
|
||||
|
||||
bool AssetLoaderFontIcon::RowIsEmpty(const std::vector<std::string>& row)
|
||||
{
|
||||
return std::all_of(row.begin(),
|
||||
row.end(),
|
||||
[](const std::string& cell)
|
||||
{
|
||||
return cell.empty();
|
||||
});
|
||||
return std::ranges::all_of(row,
|
||||
[](const std::string& cell)
|
||||
{
|
||||
return cell.empty();
|
||||
});
|
||||
}
|
||||
|
||||
bool AssetLoaderFontIcon::ParseInt(int& value, const std::string& str)
|
||||
|
@ -27,7 +27,7 @@ namespace
|
||||
{
|
||||
std::string soundFilePath(sndAlias->assetFileName);
|
||||
|
||||
std::replace(soundFilePath.begin(), soundFilePath.end(), '\\', '/');
|
||||
std::ranges::replace(soundFilePath, '\\', '/');
|
||||
for (const auto& droppedPrefix : PREFIXES_TO_DROP)
|
||||
{
|
||||
if (soundFilePath.rfind(droppedPrefix, 0) != std::string::npos)
|
||||
|
Reference in New Issue
Block a user