From: Amelia Coutard <eliottulio.coutard@gmail.com>
Date: Fri, 13 May 2022 01:20:57 +0000 (+0200)
Subject: Used assert instead of if ! { halt() }, for consistency
X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=859d3eb8ff5984c5a9102ccc7f10e869a9bd04ba;p=voyage-au-centre-des-fichiers.git

Used assert instead of if ! { halt() }, for consistency
---

diff --git a/src/fb.cpp b/src/fb.cpp
index d7f50c1..ff0beca 100644
--- a/src/fb.cpp
+++ b/src/fb.cpp
@@ -16,14 +16,8 @@ os::framebuffer::framebuffer(std::uint64_t addr, std::uint32_t pitch, std::uint3
 	this->width = width;
 	this->height = height;
 	this->bpp = bpp;
-	if (type != 1) {
-		os::println("framebuffer not in direct RGB mode.");
-		os::halt();
-	}
-	if (bpp != 32) {
-		os::println("framebuffer bpp != 32.");
-		os::halt();
-	}
+	os::assert(type == 1, "Framebuffer not in direct RGB mode.");
+	os::assert(bpp == 32, "Framebuffer bpp != 32.");
 
 	r_pos =  color_info[0];
 	r_mask = (1 << color_info[1]) - 1;