projects
/
voyage-au-centre-des-fichiers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29ac5f5
)
Used assert instead of if ! { halt() }, for consistency
author
Amelia Coutard
<eliottulio.coutard@gmail.com>
Fri, 13 May 2022 01:20:57 +0000
(
03:20
+0200)
committer
Amelia Coutard
<eliottulio.coutard@gmail.com>
Fri, 13 May 2022 01:20:57 +0000
(
03:20
+0200)
src/fb.cpp
patch
|
blob
|
history
diff --git
a/src/fb.cpp
b/src/fb.cpp
index d7f50c17e023d186c29d996beb8ecbb6a6159adf..ff0beca1bafb797eb7e57e75d6e9168a8bd200be 100644
(file)
--- 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;