From bcc2c9d0abf29af60f027e7fcf44b367c992c748 Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Thu, 17 Apr 2025 16:01:40 +0000 Subject: [PATCH] refactor(kernel): change color arrays to static --- Kernel/core/console.cpp | 4 ++-- Kernel/core/panic/handler.cpp | 4 ++-- Kernel/include/kcon.hpp | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Kernel/core/console.cpp b/Kernel/core/console.cpp index 6ee53f0c..a89f014e 100644 --- a/Kernel/core/console.cpp +++ b/Kernel/core/console.cpp @@ -27,7 +27,7 @@ namespace KernelConsole { - int TermColors[] = { + static int TermColors[] = { [TerminalColor::BLACK] = 0x000000, [TerminalColor::RED] = 0xAA0000, [TerminalColor::GREEN] = 0x00AA00, @@ -38,7 +38,7 @@ namespace KernelConsole [TerminalColor::GREY] = 0xAAAAAA, }; - int TermBrightColors[] = { + static int TermBrightColors[] = { [TerminalColor::BLACK] = 0x858585, [TerminalColor::RED] = 0xFF5555, [TerminalColor::GREEN] = 0x55FF55, diff --git a/Kernel/core/panic/handler.cpp b/Kernel/core/panic/handler.cpp index 744e2e7b..8f19590d 100644 --- a/Kernel/core/panic/handler.cpp +++ b/Kernel/core/panic/handler.cpp @@ -52,7 +52,7 @@ void *FbBeforePanic = nullptr; size_t FbPagesBeforePanic = 0; FontRenderer CrashFontRenderer; -int ExTermColors[] = { +static int ExTermColors[] = { [TerminalColor::BLACK] = 0x000000, [TerminalColor::RED] = 0xAA0000, [TerminalColor::GREEN] = 0x00AA00, @@ -63,7 +63,7 @@ int ExTermColors[] = { [TerminalColor::GREY] = 0xAAAAAA, }; -int ExTermBrightColors[] = { +static int ExTermBrightColors[] = { [TerminalColor::BLACK] = 0x858585, [TerminalColor::RED] = 0xFF5555, [TerminalColor::GREEN] = 0x55FF55, diff --git a/Kernel/include/kcon.hpp b/Kernel/include/kcon.hpp index 38797d43..9dd88e2b 100644 --- a/Kernel/include/kcon.hpp +++ b/Kernel/include/kcon.hpp @@ -155,8 +155,6 @@ namespace KernelConsole */ extern ConsoleTerminal *Terminals[16]; extern std::atomic CurrentTerminal; - extern int TermColors[]; - extern int TermBrightColors[]; bool SetTheme(std::string Theme);