mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
Everywhere: Replace ctype.h to avoid narrowing conversions
This replaces ctype.h with CharacterType.h everywhere I could find issues with narrowing conversions. While using it will probably make sense almost everywhere in the future, the most critical places should have been addressed.
This commit is contained in:
parent
1c9d87c455
commit
bc8d16ad28
16 changed files with 153 additions and 266 deletions
|
@ -13,8 +13,8 @@
|
|||
#include "Screen.h"
|
||||
#include "WindowManager.h"
|
||||
#include <AK/Badge.h>
|
||||
#include <AK/CharacterTypes.h>
|
||||
#include <WindowServer/WindowClientEndpoint.h>
|
||||
#include <ctype.h>
|
||||
|
||||
namespace WindowServer {
|
||||
|
||||
|
@ -461,7 +461,7 @@ void Window::handle_keydown_event(const KeyEvent& event)
|
|||
if (event.modifiers() == Mod_Alt && event.code_point() && menubar()) {
|
||||
Menu* menu_to_open = nullptr;
|
||||
menubar()->for_each_menu([&](Menu& menu) {
|
||||
if (tolower(menu.alt_shortcut_character()) == tolower(event.code_point())) {
|
||||
if (to_ascii_lowercase(menu.alt_shortcut_character()) == to_ascii_lowercase(event.code_point())) {
|
||||
menu_to_open = &menu;
|
||||
return IterationDecision::Break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue