From 7a3df4da0a25d8d965a722fea1a8ef70b15a72a0 Mon Sep 17 00:00:00 2001 From: w1naenator Date: Fri, 13 Mar 2026 16:23:13 +0200 Subject: [PATCH] clang --- src/core/libraries/font/font.cpp | 13 ++++--------- src/core/libraries/font/font_internal.cpp | 1 - src/core/libraries/font/fontft_internal.cpp | 10 +++------- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/src/core/libraries/font/font.cpp b/src/core/libraries/font/font.cpp index 462da8018..ac638c70e 100644 --- a/src/core/libraries/font/font.cpp +++ b/src/core/libraries/font/font.cpp @@ -679,8 +679,7 @@ s32 PS4_SYSV_ABI sceFontCreateRendererWithEdition(const OrbisFontMem* memory, static_cast( create_params); const u32 render_size = selection ? selection->size : 0u; - void* renderer_mem = - alloc_fn(memory->mspace_handle, render_size); + void* renderer_mem = alloc_fn(memory->mspace_handle, render_size); void* workspace = alloc_fn(memory->mspace_handle, 0x4000); rc = ORBIS_FONT_ERROR_ALLOCATION_FAILED; @@ -2585,8 +2584,7 @@ s32 PS4_SYSV_ABI sceFontOpenFontInstance(OrbisFontHandle fontHandle, OrbisFontHa LOG_ERROR(Lib_Font, "INVALID_LIBRARY"); return ORBIS_FONT_ERROR_INVALID_FONT_HANDLE; } - out_handle = - static_cast(alloc_fn(lib->alloc_ctx, 0x100)); + out_handle = static_cast(alloc_fn(lib->alloc_ctx, 0x100)); if (!out_handle) { release_src_lock(); if (pFontHandle) { @@ -3385,8 +3383,7 @@ s32 PS4_SYSV_ABI sceFontOpenFontSet(OrbisFontLib library, u32 fontSetType, u32 o } Internal::RemoveState(handle); } else { - handle = static_cast( - alloc_fn(lib_local->alloc_ctx, 0x100)); + handle = static_cast(alloc_fn(lib_local->alloc_ctx, 0x100)); if (!handle) { LOG_ERROR(Lib_Font, "ALLOCATION_FAILED"); return release_library_and_clear_out(ORBIS_FONT_ERROR_ALLOCATION_FAILED); @@ -4851,8 +4848,7 @@ s32 PS4_SYSV_ABI sceFontRendererSetOutlineBufferPolicy(OrbisFontRenderer fontRen } if (!renderer->workspace || renderer->workspace_size != desired_size) { - void* new_workspace = - alloc_fn(renderer->alloc_ctx, static_cast(desired_size)); + void* new_workspace = alloc_fn(renderer->alloc_ctx, static_cast(desired_size)); if (!new_workspace) { LOG_ERROR(Lib_Font, "ALLOCATION_FAILED"); return ORBIS_FONT_ERROR_ALLOCATION_FAILED; @@ -6385,4 +6381,3 @@ void RegisterlibSceFont(Core::Loader::SymbolsResolver* sym) { }; } // namespace Libraries::Font - diff --git a/src/core/libraries/font/font_internal.cpp b/src/core/libraries/font/font_internal.cpp index f64416c39..f364aba3e 100644 --- a/src/core/libraries/font/font_internal.cpp +++ b/src/core/libraries/font/font_internal.cpp @@ -1916,4 +1916,3 @@ void CachedStyleSetScalar(Libraries::Font::OrbisFontStyleFrame& cached_style, fl std::memcpy(&cached_style.cached_scalar_bits, &value, sizeof(value)); } } // namespace Libraries::Font::Internal - diff --git a/src/core/libraries/font/fontft_internal.cpp b/src/core/libraries/font/fontft_internal.cpp index b15808371..b7d5bacdd 100644 --- a/src/core/libraries/font/fontft_internal.cpp +++ b/src/core/libraries/font/fontft_internal.cpp @@ -2560,8 +2560,7 @@ static void* FtAlloc(FT_Memory memory, long size) { return nullptr; } const auto alloc_fn = reinterpret_cast(ctx->alloc_vtbl[0]); - return alloc_fn ? alloc_fn(ctx->alloc_ctx, static_cast(size)) - : nullptr; + return alloc_fn ? alloc_fn(ctx->alloc_ctx, static_cast(size)) : nullptr; } static void FtFree(FT_Memory memory, void* block) { @@ -2679,8 +2678,7 @@ s32 PS4_SYSV_ABI LibraryInitStub(const void* memory, void* library) { void** alloc_vtbl = reinterpret_cast(const_cast(mem->iface)); - auto* ctx = - static_cast(alloc_fn(alloc_ctx, sizeof(FtLibraryCtx))); + auto* ctx = static_cast(alloc_fn(alloc_ctx, sizeof(FtLibraryCtx))); if (!ctx) { return ORBIS_FONT_ERROR_ALLOCATION_FAILED; } @@ -2688,8 +2686,7 @@ s32 PS4_SYSV_ABI LibraryInitStub(const void* memory, void* library) { ctx->alloc_ctx = alloc_ctx; ctx->alloc_vtbl = alloc_vtbl; - FT_Memory ft_mem = - static_cast(alloc_fn(alloc_ctx, sizeof(FT_MemoryRec_))); + FT_Memory ft_mem = static_cast(alloc_fn(alloc_ctx, sizeof(FT_MemoryRec_))); if (!ft_mem) { free_fn(alloc_ctx, ctx); return ORBIS_FONT_ERROR_ALLOCATION_FAILED; @@ -3604,4 +3601,3 @@ s32 PS4_SYSV_ABI LibraryConfigureGlyphStub(void* fontObj, std::uint32_t* in_para } } // namespace Libraries::FontFt::Internal -