diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-07 14:48:27 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-07 14:48:27 +0200 |
| commit | 636a6034a613f98f13848bf4bf1143bf5966dbce (patch) | |
| tree | fe22135bd758e181530d208c7398913fc5b500f5 /Private | |
| parent | e80b274a23cb6bbe83bc48058c779624b16dd556 (diff) | |
MHR-23: format fix.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private')
| -rw-r--r-- | Private/CRT/__mpcc_exception.hxx | 38 | ||||
| -rw-r--r-- | Private/CRT/__mpcc_malloc.hxx | 31 | ||||
| -rw-r--r-- | Private/Source/Utils.cxx | 2 |
3 files changed, 36 insertions, 35 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 <typename KindClass, typename... Args> -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 <typename KindClass, typename... Args> + inline NewOS::VoidPtr allocate(Args&&... args) + { + return new KindClass(NewOS::forward(args)...); + } -/// @brief free a class. -/// @tparam KindClass the class type to allocate. -template <typename KindClass> -inline NewOS::Void release(KindClass ptr) -{ - if (!ptr) return; - delete ptr; -} + /// @brief free a class. + /// @tparam KindClass the class type to allocate. + template <typename KindClass> + 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; } |
