From: Amelia Coutard Date: Sat, 7 May 2022 14:45:14 +0000 (+0200) Subject: Added missing inline specifiers to all function in multiboot2.hpp X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=27881d03141681338d06d3ace039f9a0c1ef3b3f;p=voyage-au-centre-des-fichiers.git Added missing inline specifiers to all function in multiboot2.hpp --- diff --git a/src/multiboot2.hpp b/src/multiboot2.hpp index adaa1e0..cbbdf5c 100644 --- a/src/multiboot2.hpp +++ b/src/multiboot2.hpp @@ -68,25 +68,25 @@ return os::phys_ptr((ptr.get_phys_addr() + ptr->size + 7) / 8 * 8); // + 7) / 8 * 8 is required for alignment. } - std::uint64_t framebuffer_addr(os::phys_ptr ptr) { + inline std::uint64_t framebuffer_addr(os::phys_ptr ptr) { return *reinterpret_cast(&ptr->rest[0]); } - std::uint32_t framebuffer_pitch(os::phys_ptr ptr) { + inline std::uint32_t framebuffer_pitch(os::phys_ptr ptr) { return *reinterpret_cast(&ptr->rest[8]); } - std::uint32_t framebuffer_width(os::phys_ptr ptr) { + inline std::uint32_t framebuffer_width(os::phys_ptr ptr) { return *reinterpret_cast(&ptr->rest[12]); } - std::uint32_t framebuffer_height(os::phys_ptr ptr) { + inline std::uint32_t framebuffer_height(os::phys_ptr ptr) { return *reinterpret_cast(&ptr->rest[16]); } - std::uint8_t framebuffer_bpp(os::phys_ptr ptr) { + inline std::uint8_t framebuffer_bpp(os::phys_ptr ptr) { return *reinterpret_cast(&ptr->rest[20]); } - std::uint8_t framebuffer_type(os::phys_ptr ptr) { + inline std::uint8_t framebuffer_type(os::phys_ptr ptr) { return *reinterpret_cast(&ptr->rest[21]); } - const std::uint8_t* color_info(os::phys_ptr ptr) { + inline const std::uint8_t* color_info(os::phys_ptr ptr) { return reinterpret_cast(&ptr->rest[24]); } #endif // __cplusplus