mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 02:59:45 +00:00
AK: Make LexicalPath::relative_path() fallible
This commit is contained in:
parent
f026d495cd
commit
31bf40b659
Notes:
github-actions[bot]
2024-11-09 19:43:30 +00:00
Author: https://github.com/stasoid
Commit: 31bf40b659
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1918
Reviewed-by: https://github.com/ADKaster ✅
8 changed files with 12 additions and 14 deletions
|
@ -295,7 +295,7 @@ static void generate_include_for(auto& generator, auto& path)
|
|||
for (auto& search_path : g_header_search_paths) {
|
||||
if (!path.starts_with(search_path))
|
||||
continue;
|
||||
auto relative_path = LexicalPath::relative_path(path, search_path);
|
||||
auto relative_path = *LexicalPath::relative_path(path, search_path);
|
||||
if (relative_path.length() < path_string.length())
|
||||
path_string = relative_path;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue