From fba2fc4ce3d4bf4997eb42c9b5b2ac1de8692150 Mon Sep 17 00:00:00 2001 From: Fabian Imhof Date: Sun, 20 Oct 2024 08:14:54 +0000 Subject: remove faulty if statement --- arch/x86_64/include/arch/memory/paging/virtual_page.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/x86_64/include/arch/memory/paging/virtual_page.hpp b/arch/x86_64/include/arch/memory/paging/virtual_page.hpp index 1ba0f7c..46140ff 100644 --- a/arch/x86_64/include/arch/memory/paging/virtual_page.hpp +++ b/arch/x86_64/include/arch/memory/paging/virtual_page.hpp @@ -87,10 +87,7 @@ namespace teachos::arch::memory::paging std::size_t level1_index = page.get_level_index(page_table::LEVEL1); std::optional frame = page_table[level1_index].calculate_pointed_to_frame(); - if (frame.has_value()) - { - return frame; - } + return frame; } } } -- cgit v1.2.3