From 636a6034a613f98f13848bf4bf1143bf5966dbce Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 7 May 2024 14:48:27 +0200 Subject: MHR-23: format fix. Signed-off-by: Amlal El Mahrouss --- Private/CRT/__mpcc_exception.hxx | 38 ++++++++++++++-------------- Private/CRT/__mpcc_malloc.hxx | 31 ++++++++++++----------- Private/Source/Utils.cxx | 2 +- Public/Developer/SystemLib/Headers/Defines.h | 12 ++++----- 4 files changed, 42 insertions(+), 41 deletions(-) diff --git a/Private/CRT/__mpcc_exception.hxx b/Private/CRT/__mpcc_exception.hxx index e89269b1..44e341d3 100644 --- a/Private/CRT/__mpcc_exception.hxx +++ b/Private/CRT/__mpcc_exception.hxx @@ -14,27 +14,27 @@ namespace std { #ifdef __x86_64__ #ifdef __KERNEL__ - inline void __throw_general(void) - { - __asm__ ("int $0xD"); - } + inline void __throw_general(void) + { + __asm__("int $0xD"); + } #else - inline void __throw_general(void) - { - __exit(33); - } + inline void __throw_general(void) + { + __exit(33); + } #endif #else - inline void __throw_general(void) - { - __exit(33); - } + inline void __throw_general(void) + { + __exit(33); + } #endif // if __x86_64__ - inline void __throw_domain_error(const char* error) - { - NewOS::kcout << "MPCC C++: Domain error: " << error << "\r"; - __throw_general(); - CANT_REACH(); // prevent from continuing. - } -} + inline void __throw_domain_error(const char* error) + { + NewOS::kcout << "MPCC C++: Domain error: " << error << "\r"; + __throw_general(); + CANT_REACH(); // prevent from continuing. + } +} // namespace std diff --git a/Private/CRT/__mpcc_malloc.hxx b/Private/CRT/__mpcc_malloc.hxx index a990d61e..2bd60ee6 100644 --- a/Private/CRT/__mpcc_malloc.hxx +++ b/Private/CRT/__mpcc_malloc.hxx @@ -10,20 +10,21 @@ namespace stdx { -/// @brief allocate a new class. -/// @tparam KindClass the class type to allocate. -template -inline NewOS::VoidPtr allocate(Args&&... args) -{ - return new KindClass(NewOS::forward(args)...); -} + /// @brief allocate a new class. + /// @tparam KindClass the class type to allocate. + template + inline NewOS::VoidPtr allocate(Args&&... args) + { + return new KindClass(NewOS::forward(args)...); + } -/// @brief free a class. -/// @tparam KindClass the class type to allocate. -template -inline NewOS::Void release(KindClass ptr) -{ - if (!ptr) return; - delete ptr; -} + /// @brief free a class. + /// @tparam KindClass the class type to allocate. + template + inline NewOS::Void release(KindClass ptr) + { + if (!ptr) + return; + delete ptr; + } } // namespace stdx diff --git a/Private/Source/Utils.cxx b/Private/Source/Utils.cxx index b0b3be8d..05cd511a 100644 --- a/Private/Source/Utils.cxx +++ b/Private/Source/Utils.cxx @@ -230,7 +230,7 @@ EXTERN_C void memcpy(void* dst, void* src, size_t len) /// @brief memmove in C++ EXTERN_C void* memmove(void* dst, void* src, size_t len) { - NewOS::rt_copy_memory(src, dst, len); + NewOS::rt_copy_memory(src, dst, len); return dst; } diff --git a/Public/Developer/SystemLib/Headers/Defines.h b/Public/Developer/SystemLib/Headers/Defines.h index db2e1884..07e0cfeb 100644 --- a/Public/Developer/SystemLib/Headers/Defines.h +++ b/Public/Developer/SystemLib/Headers/Defines.h @@ -11,12 +11,12 @@ #endif #ifdef _DEBUG -#define CA_MUST_PASS(e) \ - { \ - if (!e) \ - { \ +#define CA_MUST_PASS(e) \ + { \ + if (!e) \ + { \ Alert("Sorry, an assertion failed.\nFile: %s\nLine: %i", __FILE__, __LINE__) RtAssertTriggerInterrupt() \ - } \ + } \ } #else #define CA_MUST_PASS(e) CA_UNREFERENCED_PARAMETER(e) @@ -129,7 +129,7 @@ enum RtProcessCall kCallSizePtr, kCallCheckPtr, kCallAllocStack, - /// @brief Open a specific handle + /// @brief Open a specific handle /// (can be used as sel to call methods related to it.) kCallOpenFile, kCallCloseFile, -- cgit v1.2.3