Kernel: Remove UART::{print_num, print_hex} since they are unused
This commit is contained in:
parent
47a58c51c6
commit
15f32379bb
Notes:
sideshowbarker
2024-07-17 11:22:34 +09:00
Author: https://github.com/FireFox317 Commit: https://github.com/SerenityOS/serenity/commit/15f32379bb Pull-request: https://github.com/SerenityOS/serenity/pull/13885 Reviewed-by: https://github.com/linusg ✅
1 changed files with 0 additions and 28 deletions
|
@ -27,34 +27,6 @@ public:
|
|||
for (size_t i = 0; i < length; ++i)
|
||||
send(*s++);
|
||||
}
|
||||
void print_num(u64 n)
|
||||
{
|
||||
char buf[21];
|
||||
int i = 0;
|
||||
do {
|
||||
buf[i++] = (n % 10) + '0';
|
||||
n /= 10;
|
||||
} while (n);
|
||||
for (i--; i >= 0; i--)
|
||||
send(buf[i]);
|
||||
}
|
||||
|
||||
void print_hex(u64 n)
|
||||
{
|
||||
char buf[17];
|
||||
static char const* digits = "0123456789ABCDEF";
|
||||
int i = 0;
|
||||
do {
|
||||
buf[i++] = digits[n % 16];
|
||||
n /= 16;
|
||||
} while (n);
|
||||
send(static_cast<u32>('0'));
|
||||
send(static_cast<u32>('x'));
|
||||
buf[16] = '\0';
|
||||
for (i--; i >= 0; i--) {
|
||||
send(buf[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
UART();
|
||||
|
|
Loading…
Add table
Reference in a new issue