diff options
author | Chris Robinson <[email protected]> | 2023-01-01 16:06:19 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-01-01 16:06:19 -0800 |
commit | 073f970788a35657537da1b1dc7c4af450888698 (patch) | |
tree | 96f9d5f5918d49f2243dedce525d98374fed22ae /al/source.cpp | |
parent | cba526e1b082150f4a7160775f2ee6cb2deb024c (diff) |
Avoid some explicit casts and references
Diffstat (limited to 'al/source.cpp')
-rw-r--r-- | al/source.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/al/source.cpp b/al/source.cpp index 1ebacf5e..5d95ba8a 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -257,7 +257,7 @@ double GetSourceSecOffset(ALsource *Source, ALCcontext *context, nanoseconds *cl const ALbuffer *BufferFmt{nullptr}; auto BufferList = Source->mQueue.cbegin(); - while(BufferList != Source->mQueue.cend() && std::addressof(*BufferList) != Current) + while(BufferList != Source->mQueue.cend() && al::to_address(BufferList) != Current) { if(!BufferFmt) BufferFmt = BufferList->mBuffer; readPos += int64_t{BufferList->mSampleLen} << MixerFracBits; @@ -306,7 +306,7 @@ double GetSourceOffset(ALsource *Source, ALenum name, ALCcontext *context) const ALbuffer *BufferFmt{nullptr}; auto BufferList = Source->mQueue.cbegin(); - while(BufferList != Source->mQueue.cend() && std::addressof(*BufferList) != Current) + while(BufferList != Source->mQueue.cend() && al::to_address(BufferList) != Current) { if(!BufferFmt) BufferFmt = BufferList->mBuffer; readPos += BufferList->mSampleLen; @@ -3674,7 +3674,7 @@ START_API_FUNC if(NewListStart != 0) { auto iter = source->mQueue.begin() + ptrdiff_t(NewListStart); - (iter-1)->mNext.store(std::addressof(*iter), std::memory_order_release); + (iter-1)->mNext.store(al::to_address(iter), std::memory_order_release); } } END_API_FUNC |