diff options
author | Chris Robinson <[email protected]> | 2022-02-15 23:15:42 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-02-15 23:15:42 -0800 |
commit | aa19223c65d8693dbaa8d8c9fa0c129d77eed4de (patch) | |
tree | 41b015eeaedfce5201e8c76931bf4492e3870560 /al/source.cpp | |
parent | fba14feab7783d9c246dd674d0cf0e26010c69d1 (diff) |
Use std::exchange instead of two swaps
Diffstat (limited to 'al/source.cpp')
-rw-r--r-- | al/source.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/al/source.cpp b/al/source.cpp index 7c6e43f9..59ce5549 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -1477,8 +1477,7 @@ void SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop, /* Source is now Static */ Source->SourceType = AL_STATIC; - Source->mQueue.swap(oldlist); - Source->mQueue.swap(newlist); + oldlist = std::exchange(Source->mQueue, std::move(newlist)); } else { |