diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-06-12 12:30:04 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-06-12 12:30:04 +0200 |
commit | 455a4f2176a5cfbe325e1e40cea20dd3e466b64c (patch) | |
tree | 7a84d0f768ee375ea9f648bbbdeac7a4906f13fb /src/Boot/Windows/BootConsoleIo.cpp | |
parent | bf9f3ec4f0a987ae1591ab5466f6eee599203c85 (diff) | |
download | VeraCrypt-455a4f2176a5cfbe325e1e40cea20dd3e466b64c.tar.gz VeraCrypt-455a4f2176a5cfbe325e1e40cea20dd3e466b64c.zip |
Avoid conflict with C++17 features std::byte by using uint8 type instead of byte
Diffstat (limited to 'src/Boot/Windows/BootConsoleIo.cpp')
-rw-r--r-- | src/Boot/Windows/BootConsoleIo.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/Boot/Windows/BootConsoleIo.cpp b/src/Boot/Windows/BootConsoleIo.cpp index 706e36f6..046f580b 100644 --- a/src/Boot/Windows/BootConsoleIo.cpp +++ b/src/Boot/Windows/BootConsoleIo.cpp @@ -101,7 +101,7 @@ void Print (const uint64 &number) } -void PrintHex (byte b) +void PrintHex (uint8 b) { PrintChar (((b >> 4) >= 0xA ? 'A' - 0xA : '0') + (b >> 4)); PrintChar (((b & 0xF) >= 0xA ? 'A' - 0xA : '0') + (b & 0xF)); @@ -110,8 +110,8 @@ void PrintHex (byte b) void PrintHex (uint16 data) { - PrintHex (byte (data >> 8)); - PrintHex (byte (data)); + PrintHex (uint8 (data >> 8)); + PrintHex (uint8 (data)); } @@ -219,9 +219,9 @@ void PrintErrorNoEndl (const char *message) } -byte GetShiftFlags () +uint8 GetShiftFlags () { - byte flags; + uint8 flags; __asm { mov ah, 2 @@ -233,7 +233,7 @@ byte GetShiftFlags () } -byte GetKeyboardChar () +uint8 GetKeyboardChar () { return GetKeyboardChar (nullptr); } @@ -253,7 +253,7 @@ inline void Sleep () } */ -byte GetKeyboardChar (byte *scanCode) +uint8 GetKeyboardChar (uint8 *scanCode) { // Work around potential BIOS bugs (Windows boot manager polls the keystroke buffer) while (!IsKeyboardCharAvailable()) @@ -265,8 +265,8 @@ byte GetKeyboardChar (byte *scanCode) } } - byte asciiCode; - byte scan; + uint8 asciiCode; + uint8 scan; __asm { mov ah, 0 @@ -302,7 +302,7 @@ bool EscKeyPressed () { if (IsKeyboardCharAvailable ()) { - byte keyScanCode; + uint8 keyScanCode; GetKeyboardChar (&keyScanCode); return keyScanCode == TC_BIOS_KEY_ESC; } @@ -346,8 +346,8 @@ bool IsDigit (char c) int GetString (char *buffer, size_t bufferSize) { - byte c; - byte scanCode; + uint8 c; + uint8 scanCode; size_t pos = 0; while (pos < bufferSize) |