diff options
author | Chris Robinson <[email protected]> | 2019-01-07 04:06:40 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-01-07 04:06:40 -0800 |
commit | 4d047e2bc166e8155dd9714e53efda09def2b6ef (patch) | |
tree | c4fd18bb468987043322f59a31297bf55844fda8 /OpenAL32/alBuffer.cpp | |
parent | 67c9cf81748422b6a96945c6e0508a61f83f12f6 (diff) |
Use user-defined literals for 64-bit literals
Diffstat (limited to 'OpenAL32/alBuffer.cpp')
-rw-r--r-- | OpenAL32/alBuffer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenAL32/alBuffer.cpp b/OpenAL32/alBuffer.cpp index 2f4b9d4d..7f2085d8 100644 --- a/OpenAL32/alBuffer.cpp +++ b/OpenAL32/alBuffer.cpp @@ -79,7 +79,7 @@ ALbuffer *AllocBuffer(ALCcontext *context) } device->BufferList.emplace_back(); sublist = device->BufferList.end() - 1; - sublist->FreeMask = ~U64(0); + sublist->FreeMask = ~0_u64; sublist->Buffers = reinterpret_cast<ALbuffer*>(al_calloc(16, sizeof(ALbuffer)*64)); if(UNLIKELY(!sublist->Buffers)) { @@ -96,7 +96,7 @@ ALbuffer *AllocBuffer(ALCcontext *context) /* Add 1 to avoid buffer ID 0. */ buffer->id = ((lidx<<6) | slidx) + 1; - sublist->FreeMask &= ~(U64(1)<<slidx); + sublist->FreeMask &= ~(1_u64 << slidx); return buffer; } @@ -109,7 +109,7 @@ void FreeBuffer(ALCdevice *device, ALbuffer *buffer) buffer->~ALbuffer(); - device->BufferList[lidx].FreeMask |= U64(1) << slidx; + device->BufferList[lidx].FreeMask |= 1_u64 << slidx; } inline ALbuffer *LookupBuffer(ALCdevice *device, ALuint id) @@ -120,7 +120,7 @@ inline ALbuffer *LookupBuffer(ALCdevice *device, ALuint id) if(UNLIKELY(lidx >= device->BufferList.size())) return nullptr; BufferSubList &sublist = device->BufferList[lidx]; - if(UNLIKELY(sublist.FreeMask & (U64(1)<<slidx))) + if(UNLIKELY(sublist.FreeMask & (1_u64 << slidx))) return nullptr; return sublist.Buffers + slidx; } @@ -1174,7 +1174,7 @@ BufferSubList::~BufferSubList() { ALsizei idx{CTZ64(usemask)}; Buffers[idx].~ALbuffer(); - usemask &= ~(U64(1) << idx); + usemask &= ~(1_u64 << idx); } FreeMask = ~usemask; al_free(Buffers); |