sys_fs: simplify get_name

This commit is contained in:
Megamouse
2026-08-21 02:26:59 +03:00
committed by Elad
parent bab81aa23e
commit 809359cb20
2 changed files with 2 additions and 9 deletions
+1 -1
View File
@@ -466,7 +466,7 @@ lv2_fs_mount_point* lv2_fs_object::get_mp(std::string_view filename, std::string
{
for (auto mp = &g_mp_sys_dev_root; mp; mp = mp->next)
{
const auto& device_alias_check = !is_path && (
const bool device_alias_check = !is_path && (
(mp == &g_mp_sys_dev_hdd0 && mp_name == "CELL_FS_IOS:PATA0_HDD_DRIVE"sv) ||
(mp == &g_mp_sys_dev_hdd1 && mp_name == "CELL_FS_IOS:PATA1_HDD_DRIVE"sv) ||
(mp == &g_mp_sys_dev_flash && mp_name == "CELL_FS_IOS:BUILTIN_FLASH"sv) ||
+1 -8
View File
@@ -264,14 +264,7 @@ public:
static std::array<char, 0x420> get_name(std::string_view filename)
{
std::array<char, 0x420> name;
if (filename.size() >= 0x420)
{
filename = filename.substr(0, 0x420 - 1);
}
filename.copy(name.data(), filename.size());
name[filename.size()] = 0;
strcpy_trunc(name, filename);
return name;
}