Skip to content

Commit

Permalink
format: formatting files
Browse files Browse the repository at this point in the history
  • Loading branch information
OEOTYAN committed Feb 11, 2024
1 parent 8e87b8a commit 04cecd4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/ll/api/memory/Hook.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ struct __declspec(empty_bases) Hook {};

#define LL_AUTO_REG_HOOK_IMPL(FUNC_PTR, STATIC, CALL, DEF_TYPE, ...) \
LL_VA_EXPAND(LL_HOOK_IMPL( \
inline ::ll::memory::HookRegistrar<DEF_TYPE> DEF_TYPE##AutoRegister, \
inline ::ll::memory::HookRegistrar<DEF_TYPE> DEF_TYPE##AutoRegister, \
FUNC_PTR, \
STATIC, \
CALL, \
Expand Down
18 changes: 9 additions & 9 deletions src/ll/api/memory/MemoryOperators.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@

#include "ll/api/memory/Memory.h"

using ll::memory::getDefaultAllocator;

__declspec(noreturn) void __CRTDECL __scrt_throw_std_bad_alloc();
__declspec(noreturn) void __CRTDECL __scrt_throw_std_bad_array_new_length();


void __CRTDECL operator delete(void* p) noexcept { getDefaultAllocator().release(p); }
void __CRTDECL operator delete(void* p) noexcept { ::ll::memory::getDefaultAllocator().release(p); }

void __CRTDECL operator delete(void* p, std::nothrow_t const&) noexcept { operator delete(p); }

Expand All @@ -27,7 +25,9 @@ void __CRTDECL operator delete(void* p, std::size_t) noexcept { operator delete(

void __CRTDECL operator delete[](void* p, std::size_t) noexcept { operator delete[](p); };

void __CRTDECL operator delete(void* p, std::align_val_t) noexcept { getDefaultAllocator().alignedRelease(p); }
void __CRTDECL operator delete(void* p, std::align_val_t) noexcept {
::ll::memory::getDefaultAllocator().alignedRelease(p);
}

void __CRTDECL operator delete(void* p, std::align_val_t alignment, std::nothrow_t const&) noexcept {
operator delete(p, alignment);
Expand All @@ -50,7 +50,7 @@ void __CRTDECL operator delete[](void* p, std::size_t, std::align_val_t alignmen

_NODISCARD _Ret_notnull_ _Post_writable_byte_size_(size)
_VCRT_ALLOCATOR void* __CRTDECL operator new(std::size_t size) {
if (void* const block = getDefaultAllocator().allocate(size)) {
if (void* const block = ::ll::memory::getDefaultAllocator().allocate(size)) {
return block;
}
if (size == SIZE_MAX) {
Expand All @@ -62,7 +62,7 @@ _VCRT_ALLOCATOR void* __CRTDECL operator new(std::size_t size) {

_NODISCARD _Ret_notnull_ _Success_(return != NULL) _Post_writable_byte_size_(size) _VCRT_ALLOCATOR void* __CRTDECL
operator new(std::size_t size, std::nothrow_t const&) noexcept {
return getDefaultAllocator().allocate(size);
return ::ll::memory::getDefaultAllocator().allocate(size);
}

_NODISCARD _Ret_notnull_ _Post_writable_byte_size_(size)
Expand All @@ -76,7 +76,7 @@ operator new[](std::size_t size, std::nothrow_t const& tag) noexcept {

_NODISCARD _Ret_notnull_ _Post_writable_byte_size_(size)
_VCRT_ALLOCATOR void* __CRTDECL operator new(std::size_t size, std::align_val_t alignment) {
if (void* const block = getDefaultAllocator().alignedAllocate(size, static_cast<size_t>(alignment))) {
if (void* const block = ::ll::memory::getDefaultAllocator().alignedAllocate(size, static_cast<size_t>(alignment))) {
return block;
}
if (size == SIZE_MAX) {
Expand All @@ -88,7 +88,7 @@ _VCRT_ALLOCATOR void* __CRTDECL operator new(std::size_t size, std::align_val_t

_NODISCARD _Ret_notnull_ _Success_(return != NULL) _Post_writable_byte_size_(size) _VCRT_ALLOCATOR void* __CRTDECL
operator new(std::size_t size, std::align_val_t alignment, std::nothrow_t const&) noexcept {
return getDefaultAllocator().alignedAllocate(size, static_cast<size_t>(alignment));
return ::ll::memory::getDefaultAllocator().alignedAllocate(size, static_cast<size_t>(alignment));
}

_NODISCARD _Ret_notnull_ _Post_writable_byte_size_(size)
Expand All @@ -100,4 +100,4 @@ _NODISCARD _Ret_notnull_ _Success_(return != NULL) _Post_writable_byte_size_(siz
operator new[](std::size_t size, std::align_val_t alignment, std::nothrow_t const& tag) noexcept {
return operator new(size, alignment, tag);
}
#endif
#endif
2 changes: 1 addition & 1 deletion src/mc/common/wrapper/WeakRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ class WeakRef {
constexpr T& operator*() const { return *get(); }

constexpr T* operator->() const { return get(); }
};
};
2 changes: 1 addition & 1 deletion src/mc/server/commands/CommandRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ class CommandRegistry {
std::string const& name,
char const* description, // will copy to std::string
::CommandPermissionLevel requirement,
struct CommandFlag f,
struct CommandFlag f,
struct CommandFlag = CommandFlagValue::None // useless, idiot
);

Expand Down
4 changes: 2 additions & 2 deletions src/mc/util/ExpressionNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class ExpressionNode {
// symbol:
// ??0ExpressionNode@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4MolangVersion@@V?$span@$$CBVHashedString@@$0?0@gsl@@@Z
MCAPI ExpressionNode(
std::string const& expression,
::MolangVersion molangVersion = MolangVersion::Latest,
std::string const& expression,
::MolangVersion molangVersion = MolangVersion::Latest,
gsl::span<class HashedString const> querySetID = gsl::span<class HashedString const>{{HashedString{"default"}}}
);

Expand Down

0 comments on commit 04cecd4

Please sign in to comment.