diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2023-10-11 16:25:00 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2023-10-11 16:25:00 +0200 |
| commit | 25a02ae2b532f0afd846c9a3471a95ce222fb99e (patch) | |
| tree | 5e8dfd5e7c2eefa6f2786b4ca7fe439e5ffc02ea | |
| parent | 23b4b00d733fd462f388d7c5264c572c89affd5c (diff) | |
| download | teachos-25a02ae2b532f0afd846c9a3471a95ce222fb99e.tar.xz teachos-25a02ae2b532f0afd846c9a3471a95ce222fb99e.zip | |
x86_64: vga: improve text mode clear code
| -rw-r--r-- | source/arch/x86_64/src/video/vga/text.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/arch/x86_64/src/video/vga/text.cpp b/source/arch/x86_64/src/video/vga/text.cpp index df61ce6..ad9e46c 100644 --- a/source/arch/x86_64/src/video/vga/text.cpp +++ b/source/arch/x86_64/src/video/vga/text.cpp @@ -27,7 +27,7 @@ namespace teachos::arch::video::vga::text auto clear(attribute attribute) -> void { *text_buffer = reinterpret_cast<decltype(text_buffer)::pointer>(default_text_buffer_address); - std::ranges::generate_n(*text_buffer, 2000, [&]{ return std::pair{' ', attribute}; }); + std::ranges::fill_n(*text_buffer, 2000, std::pair{' ', attribute}); } auto write(std::string_view code_points, attribute attribute) -> void |
