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/alEffect.cpp | |
parent | 67c9cf81748422b6a96945c6e0508a61f83f12f6 (diff) |
Use user-defined literals for 64-bit literals
Diffstat (limited to 'OpenAL32/alEffect.cpp')
-rw-r--r-- | OpenAL32/alEffect.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenAL32/alEffect.cpp b/OpenAL32/alEffect.cpp index 6a91c852..fae6cce2 100644 --- a/OpenAL32/alEffect.cpp +++ b/OpenAL32/alEffect.cpp @@ -236,7 +236,7 @@ ALeffect *AllocEffect(ALCcontext *context) } device->EffectList.emplace_back(); sublist = device->EffectList.end() - 1; - sublist->FreeMask = ~U64(0); + sublist->FreeMask = ~0_u64; sublist->Effects = static_cast<ALeffect*>(al_calloc(16, sizeof(ALeffect)*64)); if(UNLIKELY(!sublist->Effects)) { @@ -255,7 +255,7 @@ ALeffect *AllocEffect(ALCcontext *context) /* Add 1 to avoid effect ID 0. */ effect->id = ((lidx<<6) | slidx) + 1; - sublist->FreeMask &= ~(U64(1)<<slidx); + sublist->FreeMask &= ~(1_u64 << slidx); return effect; } @@ -268,7 +268,7 @@ void FreeEffect(ALCdevice *device, ALeffect *effect) effect->~ALeffect(); - device->EffectList[lidx].FreeMask |= U64(1) << slidx; + device->EffectList[lidx].FreeMask |= 1_u64 << slidx; } inline ALeffect *LookupEffect(ALCdevice *device, ALuint id) @@ -279,7 +279,7 @@ inline ALeffect *LookupEffect(ALCdevice *device, ALuint id) if(UNLIKELY(lidx >= device->EffectList.size())) return nullptr; EffectSubList &sublist = device->EffectList[lidx]; - if(UNLIKELY(sublist.FreeMask & (U64(1)<<slidx))) + if(UNLIKELY(sublist.FreeMask & (1_u64 << slidx))) return nullptr; return sublist.Effects + slidx; } @@ -574,7 +574,7 @@ EffectSubList::~EffectSubList() { ALsizei idx = CTZ64(usemask); Effects[idx].~ALeffect(); - usemask &= ~(U64(1) << idx); + usemask &= ~(1_u64 << idx); } FreeMask = ~usemask; al_free(Effects); |