mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
include: Add align() helper function.
This commit is contained in:
parent
ba713c9b37
commit
995720f5f5
@ -24,6 +24,11 @@
|
||||
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
|
||||
|
||||
static inline size_t align(size_t addr, size_t alignment)
|
||||
{
|
||||
return (addr + (alignment - 1)) & ~(alignment - 1);
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define VKD3D_PRINTF_FUNC(fmt, args) __attribute__((format(printf, fmt, args)))
|
||||
# define VKD3D_UNUSED __attribute__((unused))
|
||||
|
@ -50,11 +50,6 @@ typedef int HRESULT;
|
||||
# include "vkd3d_utils.h"
|
||||
#endif
|
||||
|
||||
static size_t align(size_t addr, unsigned int alignment)
|
||||
{
|
||||
return (addr + (alignment - 1)) & ~(alignment - 1);
|
||||
}
|
||||
|
||||
static ULONG get_refcount(void *iface)
|
||||
{
|
||||
IUnknown *unk = iface;
|
||||
|
Loading…
Reference in New Issue
Block a user