From: Amelia Coutard Date: Sat, 18 Mar 2023 20:12:58 +0000 (+0100) Subject: Made multiboot2.hpp a bit cleaner X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=731dbeb2239afc05bf91bf53f64449b5228255e7;p=voyage-au-centre-des-fichiers.git Made multiboot2.hpp a bit cleaner --- diff --git a/kernel/src/lib/multiboot2.hpp b/kernel/src/lib/multiboot2.hpp index c5837a8..6a42639 100644 --- a/kernel/src/lib/multiboot2.hpp +++ b/kernel/src/lib/multiboot2.hpp @@ -21,21 +21,13 @@ #ifdef __cplusplus constexpr std::uint32_t magic = 0xE85250D6; -#else -# define multiboot2_magic 0xE85250D6 -#endif // __cplusplus - -#ifdef __cplusplus constexpr std::uint32_t arch_i386_32bit = 0; constexpr std::uint32_t arch_mips_32bit = 4; + constexpr std::uint32_t checksum(std::uint32_t arch, std::uint32_t length) { return -(magic + arch + length); } #else +# define multiboot2_magic 0xE85250D6 # define multiboot2_arch_i386_32bit 0 # define multiboot2_arch_mips_32bit 4 -#endif // __cplusplus - -#ifdef __cplusplus - constexpr std::uint32_t checksum(std::uint32_t arch, std::uint32_t length) { return -(magic + arch + length); } -#else # define multiboot2_checksum(arch, length) -(multiboot2_magic + (arch) + (length)) #endif // __cplusplus