mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 07:37:03 +00:00
Revert "Unicode: s/codepoint/code_point/g"
This reverts commit ea9ac3155d
.
It replaced "codepoint" with "code_points", not "code_point".
This commit is contained in:
parent
9664bac281
commit
19ac1f6368
Notes:
sideshowbarker
2024-07-19 04:15:33 +09:00
Author: https://github.com/nico
Commit: 19ac1f6368
Pull-request: https://github.com/SerenityOS/serenity/pull/3018
45 changed files with 449 additions and 449 deletions
|
@ -33,21 +33,21 @@ namespace Gfx {
|
|||
|
||||
static HashMap<u32, RefPtr<Gfx::Bitmap>> s_emojis;
|
||||
|
||||
const Bitmap* Emoji::emoji_for_code_points(u32 code_points)
|
||||
const Bitmap* Emoji::emoji_for_codepoint(u32 codepoint)
|
||||
{
|
||||
auto it = s_emojis.find(code_points);
|
||||
auto it = s_emojis.find(codepoint);
|
||||
if (it != s_emojis.end())
|
||||
return (*it).value.ptr();
|
||||
|
||||
String path = String::format("/res/emoji/U+%X.png", code_points);
|
||||
String path = String::format("/res/emoji/U+%X.png", codepoint);
|
||||
|
||||
auto bitmap = Bitmap::load_from_file(path);
|
||||
if (!bitmap) {
|
||||
s_emojis.set(code_points, nullptr);
|
||||
s_emojis.set(codepoint, nullptr);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
s_emojis.set(code_points, bitmap);
|
||||
s_emojis.set(codepoint, bitmap);
|
||||
return bitmap.ptr();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue