mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
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.
This commit is contained in:
committed by
Andreas Kling
parent
f746bbda17
commit
602c3fdb3a
Notes:
sideshowbarker
2024-07-19 06:06:58 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/602c3fdb3a0 Pull-request: https://github.com/SerenityOS/serenity/pull/2394 Reviewed-by: https://github.com/awesomekling ✅
@@ -24,7 +24,7 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/FileSystemPath.h>
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/Utf32View.h>
|
||||
#include <LibCore/DirIterator.h>
|
||||
@@ -43,10 +43,10 @@ static Vector<u32> supported_emoji_codepoints()
|
||||
Core::DirIterator dt("/res/emoji", Core::DirIterator::SkipDots);
|
||||
while (dt.has_next()) {
|
||||
auto filename = dt.next_path();
|
||||
auto fspath = FileSystemPath(filename);
|
||||
if (fspath.extension() != "png")
|
||||
auto lexical_path = LexicalPath(filename);
|
||||
if (lexical_path.extension() != "png")
|
||||
continue;
|
||||
auto basename = fspath.basename();
|
||||
auto basename = lexical_path.basename();
|
||||
if (!basename.starts_with("U+"))
|
||||
continue;
|
||||
u32 codepoint = strtoul(basename.characters() + 2, nullptr, 16);
|
||||
|
||||
Reference in New Issue
Block a user