mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-10-31 00:17:44 +08:00
Fix werror=type-limit on systems with char=unsigned char.
This commit is contained in:
parent
ebf857e73b
commit
65705d5bc7
@ -107,7 +107,8 @@ Event Event::GetEvent(std::function<char()> getchar) {
|
|||||||
std::string input;
|
std::string input;
|
||||||
input += getchar();
|
input += getchar();
|
||||||
|
|
||||||
switch (input[0]) {
|
unsigned char head = input[0];
|
||||||
|
switch (head) {
|
||||||
case 24: // CAN
|
case 24: // CAN
|
||||||
case 26: // SUB
|
case 26: // SUB
|
||||||
return Event(); // Ignored.
|
return Event(); // Ignored.
|
||||||
@ -119,10 +120,10 @@ Event Event::GetEvent(std::function<char()> getchar) {
|
|||||||
return ParseESC(getchar, input);
|
return ParseESC(getchar, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (input[0] >= 0 && input[0] < 32) // C0
|
if (head < 32) // C0
|
||||||
return Event::Special(input);
|
return Event::Special(input);
|
||||||
|
|
||||||
if (input[0] == 127) // Delete
|
if (head == 127) // Delete
|
||||||
return Event::Special(input);
|
return Event::Special(input);
|
||||||
|
|
||||||
return ParseUTF8(getchar, input);
|
return ParseUTF8(getchar, input);
|
||||||
|
Loading…
Reference in New Issue
Block a user