summaryrefslogtreecommitdiffhomepage
path: root/Private/Source/Framebuffer.cxx
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-29 18:17:47 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-29 18:18:59 +0100
commit65254486efff0fd1bb78a48ff90b7713a5ce539f (patch)
tree20ce02c12a74ba9e6cd382bf9c1f09a0c611cb4d /Private/Source/Framebuffer.cxx
parentf03986937db0b927da4b10554801e18e4dc7c43f (diff)
Kernel: Update TODO.
Src: Refactorings according to clang-format. Meta: Update specification. Public: Remove useless UIKit. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/Source/Framebuffer.cxx')
-rw-r--r--Private/Source/Framebuffer.cxx39
1 files changed, 18 insertions, 21 deletions
diff --git a/Private/Source/Framebuffer.cxx b/Private/Source/Framebuffer.cxx
index 208e90e9..1a73e449 100644
--- a/Private/Source/Framebuffer.cxx
+++ b/Private/Source/Framebuffer.cxx
@@ -9,31 +9,28 @@
#include <KernelKit/Framebuffer.hpp>
-namespace hCore
-{
- Framebuffer::Framebuffer(hCore::Ref<FramebufferContext*> &addr)
- : m_FrameBufferAddr(addr), m_Colour(FramebufferColorKind::RGB32)
- {}
+namespace hCore {
+Framebuffer::Framebuffer(hCore::Ref<FramebufferContext*>& addr)
+ : m_FrameBufferAddr(addr), m_Colour(FramebufferColorKind::RGB32) {}
- Framebuffer::~Framebuffer() = default;
+Framebuffer::~Framebuffer() = default;
- volatile UIntPtr* Framebuffer::operator[](const UIntPtr& width_and_height)
- {
- if (m_FrameBufferAddr)
- return reinterpret_cast<volatile hCore::UIntPtr*>(m_FrameBufferAddr->m_Base + width_and_height);
+volatile UIntPtr* Framebuffer::operator[](const UIntPtr& width_and_height) {
+ if (m_FrameBufferAddr)
+ return reinterpret_cast<volatile hCore::UIntPtr*>(
+ m_FrameBufferAddr->m_Base + width_and_height);
- return nullptr;
- }
+ return nullptr;
+}
- Ref<FramebufferContext*>& Framebuffer::Leak() { return m_FrameBufferAddr; }
+Ref<FramebufferContext*>& Framebuffer::Leak() { return m_FrameBufferAddr; }
- Framebuffer::operator bool() { return m_FrameBufferAddr; }
+Framebuffer::operator bool() { return m_FrameBufferAddr; }
- const FramebufferColorKind& Framebuffer::Color(const FramebufferColorKind& colour)
- {
- if (colour != FramebufferColorKind::INVALID)
- m_Colour = colour;
+const FramebufferColorKind& Framebuffer::Color(
+ const FramebufferColorKind& colour) {
+ if (colour != FramebufferColorKind::INVALID) m_Colour = colour;
- return m_Colour;
- }
-} // namespace hCore
+ return m_Colour;
+}
+} // namespace hCore