Kernel: Add to_sv() helper for AML String

This commit is contained in:
2024-12-18 01:43:46 +02:00
parent 2259614640
commit 7eb186dad4
2 changed files with 7 additions and 10 deletions

View File

@@ -1507,10 +1507,7 @@ namespace Kernel::ACPI::AML
return {};
};
auto source_sv = BAN::StringView(
reinterpret_cast<const char*>(source.as.str_buf->bytes),
source.as.str_buf->size
);
auto source_sv = source.as.str_buf->as_sv();
while (!source_sv.empty() && !isdigit(source_sv[0]) && source_sv[0] != '-' && source_sv[0] != '+')
source_sv = source_sv.substring(1);