aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86_64/src/boot/initialize_runtime.cpp4
-rw-r--r--arch/x86_64/src/memory/region_allocator.cpp6
-rw-r--r--arch/x86_64/src/vga/text.cpp6
3 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86_64/src/boot/initialize_runtime.cpp b/arch/x86_64/src/boot/initialize_runtime.cpp
index 70172c9..46dd5e4 100644
--- a/arch/x86_64/src/boot/initialize_runtime.cpp
+++ b/arch/x86_64/src/boot/initialize_runtime.cpp
@@ -16,8 +16,8 @@ extern "C"
auto constructors = std::span{&__ctors_start, &__ctors_end};
auto initializers = std::span{&__init_array_start, &__init_array_end};
- auto apply_invoke = [](auto invokable) {
- return std::invoke(invokable);
+ auto apply_invoke = [](auto invokable) -> void {
+ std::invoke(invokable);
};
std::ranges::for_each(constructors, apply_invoke);
diff --git a/arch/x86_64/src/memory/region_allocator.cpp b/arch/x86_64/src/memory/region_allocator.cpp
index a0579a3..8ea76c6 100644
--- a/arch/x86_64/src/memory/region_allocator.cpp
+++ b/arch/x86_64/src/memory/region_allocator.cpp
@@ -40,10 +40,10 @@ namespace teachos::memory::x86_64
m_current_region.reset();
auto next_area_with_free_frames =
m_memory_map | std::views::filter(&multiboot2::memory_map::region::available) |
- std::views::filter([next = m_next_frame](auto const & region) { return last_frame(region) >= next; });
+ std::views::filter([next = m_next_frame](auto const & region) -> bool { return last_frame(region) >= next; });
- auto lowest_region_with_free_frames =
- std::ranges::min_element(next_area_with_free_frames, [](auto lhs, auto rhs) { return lhs.base < rhs.base; });
+ auto lowest_region_with_free_frames = std::ranges::min_element(
+ next_area_with_free_frames, [](auto lhs, auto rhs) -> bool { return lhs.base < rhs.base; });
if (lowest_region_with_free_frames != next_area_with_free_frames.end())
{
diff --git a/arch/x86_64/src/vga/text.cpp b/arch/x86_64/src/vga/text.cpp
index 0e0d353..6ecffa3 100644
--- a/arch/x86_64/src/vga/text.cpp
+++ b/arch/x86_64/src/vga/text.cpp
@@ -48,7 +48,7 @@ namespace teachos::vga::x86_64::text
auto current_line = buffer_offset / DEFAULT_TEXT_BUFFER_WIDTH;
auto next_line = current_line + 1;
- if (next_line >= DEFAULT_TEXT_BUFFER_HEIGHT)
+ if (std::cmp_greater_equal(next_line, DEFAULT_TEXT_BUFFER_HEIGHT))
{
auto begin = vga_buffer_pointer + DEFAULT_TEXT_BUFFER_WIDTH;
auto end = vga_buffer_pointer + DEFAULT_TEXT_BUFFER_WIDTH * DEFAULT_TEXT_BUFFER_HEIGHT;
@@ -63,12 +63,12 @@ namespace teachos::vga::x86_64::text
auto device::write(std::string_view code_points, attribute attribute) -> void
{
- std::ranges::for_each(code_points, [&](auto code_point) { write_char(code_point, attribute); });
+ std::ranges::for_each(code_points, [&](auto code_point) -> void { write_char(code_point, attribute); });
}
auto device::writeln(std::string_view code_points, attribute attribute) -> void
{
- std::ranges::for_each(code_points, [&](auto code_point) { write_char(code_point, attribute); });
+ std::ranges::for_each(code_points, [&](auto code_point) -> void { write_char(code_point, attribute); });
newline();
}