From 25a02ae2b532f0afd846c9a3471a95ce222fb99e Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 11 Oct 2023 16:25:00 +0200 Subject: x86_64: vga: improve text mode clear code --- source/arch/x86_64/src/video/vga/text.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/arch/x86_64') 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(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 -- cgit v1.2.3