diff options
author | Nico Weber <thakis@chromium.org> | 2020-08-05 16:28:19 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-05 22:33:42 +0200 |
commit | 19ac1f6368c91cc00a68717001ea4eae65567a47 (patch) | |
tree | 65e4e9a85f0a39085c80bf954d5889e396e0ee4e /Libraries/LibGUI/EmojiInputDialog.cpp | |
parent | 9664bac281c72822da59e7f83af65d4f411d10a5 (diff) | |
download | serenity-19ac1f6368c91cc00a68717001ea4eae65567a47.zip |
Revert "Unicode: s/codepoint/code_point/g"
This reverts commit ea9ac3155d1774f13ac4e9a96605c0e85a8f299e.
It replaced "codepoint" with "code_points", not "code_point".
Diffstat (limited to 'Libraries/LibGUI/EmojiInputDialog.cpp')
-rw-r--r-- | Libraries/LibGUI/EmojiInputDialog.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Libraries/LibGUI/EmojiInputDialog.cpp b/Libraries/LibGUI/EmojiInputDialog.cpp index e4141ec191..f345cf7f49 100644 --- a/Libraries/LibGUI/EmojiInputDialog.cpp +++ b/Libraries/LibGUI/EmojiInputDialog.cpp @@ -37,9 +37,9 @@ namespace GUI { -static Vector<u32> supported_emoji_code_pointss() +static Vector<u32> supported_emoji_codepoints() { - Vector<u32> code_pointss; + Vector<u32> codepoints; Core::DirIterator dt("/res/emoji", Core::DirIterator::SkipDots); while (dt.has_next()) { auto filename = dt.next_path(); @@ -49,10 +49,10 @@ static Vector<u32> supported_emoji_code_pointss() auto basename = lexical_path.basename(); if (!basename.starts_with("U+")) continue; - u32 code_points = strtoul(basename.characters() + 2, nullptr, 16); - code_pointss.append(code_points); + u32 codepoint = strtoul(basename.characters() + 2, nullptr, 16); + codepoints.append(codepoint); } - return code_pointss; + return codepoints; } EmojiInputDialog::EmojiInputDialog(Window* parent_window) @@ -67,20 +67,20 @@ EmojiInputDialog::EmojiInputDialog(Window* parent_window) auto& main_layout = main_widget.set_layout<VerticalBoxLayout>(); main_layout.set_spacing(0); - auto code_pointss = supported_emoji_code_pointss(); + auto codepoints = supported_emoji_codepoints(); size_t index = 0; size_t columns = 6; - size_t rows = ceil_div(code_pointss.size(), columns); + size_t rows = ceil_div(codepoints.size(), columns); - for (size_t row = 0; row < rows && index < code_pointss.size(); ++row) { + for (size_t row = 0; row < rows && index < codepoints.size(); ++row) { auto& horizontal_container = main_widget.add<Widget>(); auto& horizontal_layout = horizontal_container.set_layout<HorizontalBoxLayout>(); horizontal_layout.set_spacing(0); for (size_t column = 0; column < columns; ++column) { - if (index < code_pointss.size()) { + if (index < codepoints.size()) { StringBuilder builder; - builder.append(Utf32View(&code_pointss[index++], 1)); + builder.append(Utf32View(&codepoints[index++], 1)); auto emoji_text = builder.to_string(); auto& button = horizontal_container.add<Button>(emoji_text); button.set_button_style(Gfx::ButtonStyle::CoolBar); |