diff options
author | Sergey Bugaev <bugaevc@serenityos.org> | 2020-05-26 14:52:44 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-26 14:35:10 +0200 |
commit | 602c3fdb3a0975418886e32cf9cc53b45d2f8964 (patch) | |
tree | 079b3ebdaf7db517625496e35acf1158adacad77 /Libraries/LibGfx | |
parent | f746bbda174d914d5de9379084a6fb2095c58d68 (diff) | |
download | serenity-602c3fdb3a0975418886e32cf9cc53b45d2f8964.zip |
AK: Rename FileSystemPath -> LexicalPath
And move canonicalized_path() to a static method on LexicalPath.
This is to make it clear that FileSystemPath/canonicalized_path() only
perform *lexical* canonicalization.
Diffstat (limited to 'Libraries/LibGfx')
-rw-r--r-- | Libraries/LibGfx/GIFLoader.cpp | 6 | ||||
-rw-r--r-- | Libraries/LibGfx/PNGLoader.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Libraries/LibGfx/GIFLoader.cpp b/Libraries/LibGfx/GIFLoader.cpp index 6af06e353b..70d2354f14 100644 --- a/Libraries/LibGfx/GIFLoader.cpp +++ b/Libraries/LibGfx/GIFLoader.cpp @@ -26,7 +26,7 @@ #include <AK/BufferStream.h> #include <AK/ByteBuffer.h> -#include <AK/FileSystemPath.h> +#include <AK/LexicalPath.h> #include <AK/MappedFile.h> #include <AK/NonnullOwnPtrVector.h> #include <LibGfx/GIFLoader.h> @@ -99,7 +99,7 @@ RefPtr<Gfx::Bitmap> load_gif(const StringView& path) GIFImageDecoderPlugin gif_decoder((const u8*)mapped_file.data(), mapped_file.size()); auto bitmap = gif_decoder.bitmap(); if (bitmap) - bitmap->set_mmap_name(String::format("Gfx::Bitmap [%dx%d] - Decoded GIF: %s", bitmap->width(), bitmap->height(), canonicalized_path(path).characters())); + bitmap->set_mmap_name(String::format("Gfx::Bitmap [%dx%d] - Decoded GIF: %s", bitmap->width(), bitmap->height(), LexicalPath::canonicalized_path(path).characters())); return bitmap; } @@ -536,7 +536,7 @@ GIFImageDecoderPlugin::GIFImageDecoderPlugin(const u8* data, size_t size) m_context->data_size = size; } -GIFImageDecoderPlugin::~GIFImageDecoderPlugin() {} +GIFImageDecoderPlugin::~GIFImageDecoderPlugin() { } Size GIFImageDecoderPlugin::size() { diff --git a/Libraries/LibGfx/PNGLoader.cpp b/Libraries/LibGfx/PNGLoader.cpp index ca7d5136b4..702c1bf2e0 100644 --- a/Libraries/LibGfx/PNGLoader.cpp +++ b/Libraries/LibGfx/PNGLoader.cpp @@ -25,7 +25,7 @@ */ #include <AK/ByteBuffer.h> -#include <AK/FileSystemPath.h> +#include <AK/LexicalPath.h> #include <AK/MappedFile.h> #include <AK/NetworkOrdered.h> #include <LibCore/puff.h> @@ -193,7 +193,7 @@ RefPtr<Gfx::Bitmap> load_png(const StringView& path) return nullptr; auto bitmap = load_png_impl((const u8*)mapped_file.data(), mapped_file.size()); if (bitmap) - bitmap->set_mmap_name(String::format("Gfx::Bitmap [%dx%d] - Decoded PNG: %s", bitmap->width(), bitmap->height(), canonicalized_path(path).characters())); + bitmap->set_mmap_name(String::format("Gfx::Bitmap [%dx%d] - Decoded PNG: %s", bitmap->width(), bitmap->height(), LexicalPath::canonicalized_path(path).characters())); return bitmap; } |