From be502a39fdb95ea8336ca6858c7600b88c6e9044 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 12 May 2018 19:24:04 +0200 Subject: [PATCH] Cleanups --- gfx/common/d3dcompiler_common.h | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/gfx/common/d3dcompiler_common.h b/gfx/common/d3dcompiler_common.h index 4af28e89b5..58f85317fb 100644 --- a/gfx/common/d3dcompiler_common.h +++ b/gfx/common/d3dcompiler_common.h @@ -26,17 +26,28 @@ typedef ID3DBlob* D3DBlob; typedef ID3DDestructionNotifier* D3DDestructionNotifier; + #if !defined(__cplusplus) || defined(CINTERFACE) -static INLINE ULONG D3DReleaseBlob(D3DBlob blob) { return blob->lpVtbl->Release(blob); } +static INLINE ULONG D3DReleaseBlob(D3DBlob blob) +{ + return blob->lpVtbl->Release(blob); +} + static INLINE LPVOID D3DGetBufferPointer(D3DBlob blob) { return blob->lpVtbl->GetBufferPointer(blob); } -static INLINE SIZE_T D3DGetBufferSize(D3DBlob blob) { return blob->lpVtbl->GetBufferSize(blob); } -static INLINE ULONG D3DReleaseDestructionNotifier(D3DDestructionNotifier destruction_notifier) +static INLINE SIZE_T D3DGetBufferSize(D3DBlob blob) +{ + return blob->lpVtbl->GetBufferSize(blob); +} + +static INLINE ULONG D3DReleaseDestructionNotifier( + D3DDestructionNotifier destruction_notifier) { return destruction_notifier->lpVtbl->Release(destruction_notifier); } + static INLINE HRESULT D3DRegisterDestructionCallback( D3DDestructionNotifier destruction_notifier, PFN_DESTRUCTION_CALLBACK callback_fn, @@ -46,8 +57,10 @@ static INLINE HRESULT D3DRegisterDestructionCallback( return destruction_notifier->lpVtbl->RegisterDestructionCallback( destruction_notifier, callback_fn, data, callback_id); } + static INLINE HRESULT -D3DUnregisterDestructionCallback(D3DDestructionNotifier destruction_notifier, UINT callback_id) +D3DUnregisterDestructionCallback( + D3DDestructionNotifier destruction_notifier, UINT callback_id) { return destruction_notifier->lpVtbl->UnregisterDestructionCallback( destruction_notifier, callback_id); @@ -55,5 +68,7 @@ D3DUnregisterDestructionCallback(D3DDestructionNotifier destruction_notifier, UI #endif /* end of auto-generated */ -bool d3d_compile(const char* src, size_t size, LPCSTR src_name, LPCSTR entrypoint, LPCSTR target, D3DBlob* out); +bool d3d_compile(const char* src, size_t size, + LPCSTR src_name, LPCSTR entrypoint, LPCSTR target, D3DBlob* out); + bool d3d_compile_from_file(LPCWSTR filename, LPCSTR entrypoint, LPCSTR target, D3DBlob* out);