1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

AK: Remove the LexicalPath::is_valid() API

Since this is always set to true on the non-default constructor and
subsequently never modified, it is somewhat pointless. Furthermore,
there are arguably no invalid relative paths.
This commit is contained in:
Max Wipfli 2021-06-29 13:11:03 +02:00 committed by Andreas Kling
parent caa9daf59e
commit 9b8f35259c
10 changed files with 14 additions and 66 deletions

View file

@ -14,10 +14,6 @@ namespace WindowServer {
CursorParams CursorParams::parse_from_filename(const StringView& cursor_path, const Gfx::IntPoint& default_hotspot)
{
LexicalPath path(cursor_path);
if (!path.is_valid()) {
dbgln("Cannot parse invalid cursor path, use default cursor params");
return { default_hotspot };
}
auto file_title = path.title();
auto last_dot_in_title = StringView(file_title).find_last_of('.');
if (!last_dot_in_title.has_value() || last_dot_in_title.value() == 0) {